aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JBoss config issue? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JBoss config issue?" Watch "JBoss config issue?" New topic
Author

JBoss config issue?

D. Clarke
Greenhorn

Joined: May 09, 2006
Posts: 25
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

Joined: Jul 20, 2005
Posts: 10201
    
166

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 ]

[My Blog] [JavaRanch Journal]
 
jQuery in Action, 2nd edition
 
subject: JBoss config issue?