wood burning stoves*
The moose likes Struts and the fly likes html option tag error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html option tag error " Watch "html option tag error " New topic
Author

html option tag error

Raj
Greenhorn

Joined: Dec 05, 2007
Posts: 17
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

Joined: Oct 29, 2001
Posts: 8935
    
    9

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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 ]

Merrill
Consultant, Sima Solutions
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Rajm mr",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"raj",
Please check your private messages right away. Your account is about to be closed.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: html option tag error