• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html option tag error

 
Raj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Expert's
<html:select>
<html ption value="<%=departmentId%>"><%=departmentName%></html ption>
</html:select>
where departmentId is an int.

This code was compiling and running in Orion just fine, however, when trying to access
this page in JBoss, I get the following error:

An error occurred at line: 1,745 in the jsp file: /insurance/jsp/selectTenderType.jsp
| Generated servlet error:
| The method setValue(String) in the type OptionTag is not applicable for the arguments (int)
|
how to solve this problem.Please help me.Its Urgent.
 
Joe Ess
Bartender
Posts: 9295
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every question on JavaRanch is "urgent", at least to the person asking it. Please Ease Up.
As for your question, have a look at this post.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try changing <%=departmentId%> to <%= (new Integer(departmentId)).toString%>. That way the argument is a String instead of an integer.
[ February 04, 2008: Message edited by: Merrill Higginson ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"raj",
Please check your private messages right away. Your account is about to be closed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic