File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes S2 ques: datatype to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "S2 ques: datatype to use?" Watch "S2 ques: datatype to use?" New topic
Author

S2 ques: datatype to use?

Raj Bhandari
Ranch Hand

Joined: Oct 19, 2005
Posts: 97
Hi everyone,
Simple question: In struts1 I had read that we should use String datatype for properties (in actionform). Is the same true for properties we use in struts2 now? Eg. if we have a variable in our backend say int age.. for struts property should we use int or string?

Tks!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Struts 2 is much better at handling conversion to/from different data types than Struts 1 was. It's not foolproof, but with a simple type such as int, S2 can handle the conversion quite well.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: S2 ques: datatype to use?
 
Similar Threads
sequence generator with mysql
Accessing Registry
how can i insert a null value in a table
Struts action form properties
what is hibernate data type?