Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

S2 ques: datatype to use?

 
Raj Bhandari
Ranch Hand
Posts: 97
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic