It's not a secret anymore!
The moose likes Struts and the fly likes No getter property .... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter property ...." Watch "No getter property ...." New topic

No getter property ....

Sam Drake
Ranch Hand

Joined: Jun 05, 2003
Posts: 33
Hi guys,
I'm getting an error message as follows -
[No getter method available for property strListType for bean under name
org.apache.struts.taglib.html.BEAN]: javax.servlet.jsp.JspException: No getter method
available for property strListType for bean under name org.apache.struts.taglib.html.BEAN
at org.apache.struts.taglib.html.SelectTag.doStartTag(

This seems to be happening in a <html:select tag > in my jsp: The code in the jsp is as follows ::
<html:form action="/genPriceListDtls">
<html:select property="strListType" style="width: 145px" onchange="fnShowLevel()">
<html ption value="-"><%=UIConstants.SELECT_LIST_TYPE %></html ption>
<html ptions collection="PriceListTypes" property="key" labelProperty="value" />
My struts-config.xml file has the following declarations

<form-bean name="AddPriceListForm" type="actionforms.AddPriceListForm"></form-bean>
<action path="/CreateNewPriceList" type="actions.NewPriceList"
validate="false" >
<forward name="success" path="/pricelist/RV2_AddPriceListHeader.jsp" ></forward>
My form bean has the getter method for the same String strListType (I've checked it a dozen times!!)
What is the problem here? Is it something special with the :select tag? Am I missing something?
Please help.
Josh Landin

Joined: Jun 09, 2003
Posts: 10
Is your getter in the AddPriceListForm bean cased correctly?
Should have a capital "S":
Simon Lucas

Joined: Oct 01, 2004
Posts: 1
I experienced a similar proble. The cause appears to be the case givent to your select tag under its propert name, hence in your .jsp file
<html:select property="mySelect"> is O.K. whereas
<html:select property="MySelect"> is NOT. Presumably, the struts Form class uses introspection and BeanInfo and expects the getter to be

public String[] getMySelect() {
return mySelect;

a capitalised MySelect seems to throw this off kilter.

Good Luck,

Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

<html:form action="/genPriceListDtls">
<action path="/CreateNewPriceList" ...

There's your problem.

A good workman is known by his tools.
I agree. Here's the link:
subject: No getter property ....
jQuery in Action, 3rd edition