Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes Numberfromat Exception.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Numberfromat Exception.." Watch "Numberfromat Exception.." New topic

Numberfromat Exception..

Pranit Saha
Ranch Hand

Joined: Sep 09, 2001
Posts: 130
int inum = 10;
How can i write this value to the height property(int) of a bean from a jsp..
<jsp:setProperty name="bn" property="height" value="+inum+" />
It gives NumberFormatException.. pls help..
anand chawla
Ranch Hand

Joined: Oct 19, 2000
Posts: 91
int num=10;
<jsp:setProperty name="bn" property="height" value="<%=num%>" />
should work properly
It is sorta covered in the JavaRanch Style Guide.
subject: Numberfromat Exception..
Similar Threads
Help! problem while using logic:iterate with HashMap
Indefinite loop
Flow control
Logic:iterate How to break the loop for a certain value in collection