File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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?

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.

Consultant, Sima Solutions
I agree. Here's the link:
subject: S2 ques: datatype to use?
It's not a secret anymore!