Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss config issue?

 
D. Clarke
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an EAR file deployed under JBoss 4.0.2, running JDK1.5 on OS X. I am getting the following error from this line in my JSP:

<html:select property="state" tabindex="14" >
<html ption value="">Select</html ption>
<html ptions collection="states" property="value" labelProperty="value"/>
</html:select>

where "state" is a collection in the session.

Here is the error:

javax.servlet.jsp.JspException: No getter method available for property value for bean under name states
at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:252)

I have the struts-html.tld in the appropriate JAR file contained in the EAR. I also have the struts-1.1.jar file in both my deploy/lib/ and in the EAR file.

The object that is being used to display is the ValueBean. I can't say I know what is causing this - the libraries appear to be there. The previous "html:text" instances are not throwing an error.

thank you for any advice or pointers you can share with me.
 
Jaikiran Pai
Marshal
Pie
Posts: 10444
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The User reference docs for htmlptions athtmlptions reference mentions:

This tag operates in one of two major modes, depending on whether or not the collection attribute is specified. If the collection attribute is included, the following rules apply:

- The collection attribute is interpreted as the name of a JSP bean, in some scope, that itself represents a collection of individual beans, one per option value to be rendered.
- The property attribute is interpreted as the name of a property of the individual beans included in the collection, and is used to retrieve the value that will be returned to the server if this option is selected.
- The labelProperty attribute is interpreted as the name of a property of the individual beans included in the collection, and is used to retrieve the label that will be displayed to the user for this option. If the labelProperty attribute is not specified, the property named by the property attribute will be used to select both the value returned to the server and the label displayed to the user for this option.

If the collection attribute is not specified, the rules described in the remainder of this section apply.


Looks like an issue with the way you have used the htmlptions tag. The guys at Struts forum might be able to help you more, if someone moved this thread over there.
[ October 30, 2006: Message edited by: Jaikiran Pai ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic