View RSS Feed

Struts

Type Conversion in Struts

Rating: 1 votes, 1.00 average.
by , 07-07-2012 at 06:50 PM (1489 Views)
The protocol treats all the HTTP requests as a String. It may include Boolean, integers, dates, numbers, decimals and everything. According to HTTP protocol, everything is a string. As compared to this approach, the struts class supports the data types and it has properties.
Different types of converters are used by the struts so that it can perform heavy lifting. For example, in your Action class you have a specific data type like integer; it will be automatically converted into integer attribute by the Struts in the request paramenter without your knowledge or explicit conversion. A wide numver of converters are supported by the Struts.

Following is the list of type converted used by the Stuts.
Integer
Float
Decimal
Double
Date
Datetime
Arrays
Enumerations
Collections
Boolean
BigDecimal

Submit "Type Conversion in Struts" to Facebook Submit "Type Conversion in Struts" to Digg Submit "Type Conversion in Struts" to del.icio.us Submit "Type Conversion in Struts" to StumbleUpon Submit "Type Conversion in Struts" to Google

Comments