Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • 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: 9597
36
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

 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!