Type Conversion in Struts
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.