wood burning stoves*
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
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
 
It is sorta covered in the JavaRanch Style Guide.
 
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?