wood burning stoves*
The moose likes Struts and the fly likes How do I get an int in JSP using struts ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How do I get an int in JSP using struts ???" Watch "How do I get an int in JSP using struts ???" New topic
Author

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

Kishore Sahu
Ranch Hand

Joined: Mar 10, 2009
Posts: 31
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



Kishore
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9321
    
  17

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



SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I get an int in JSP using struts ???