• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

JBoss config issue?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The User reference docs for html:options athtml:options 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 html:options 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 ]
 
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic