• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I get an int in JSP using struts ???

 
Kishore Sahu
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am really harassed.
I tried a lot, but not getting a solution to this.
See below my codes.


result is the object for the class having the field ssNum
The above code returns an int by a getSsNum method as follows.



But here, even if that returns an int, i did not get and did not add a number into that.
Please help me.
I tried other way also as follows.



Here its printing the number, but when I am trying the below line, its giving some error.


Error is

 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I read that if you use bean:define on a primitive value, then it gets wrapped into its wrapper class. So you can use this

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic