javax.servlet.jsp.JspException: No getter method for property

I am unable to find out what I am doing wrong. I am bound to use Form Bean within Form Bean as there are numerous different parts of the form. Basically, there is a response part as well as request part on the same form.

While initializing the view, I am getting a no getter method exception. I am using Struts 1.2

javax.servlet.jsp.JspException: No getter method for property getAvailableAddres
sRequest.resellerId of bean org.apache.struts.taglib.html.BEAN
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)

struts-config.xml:

<form-beans>
        <form-bean name="getAvailableAddress" type="com.wisor.talktalk.model.GetAvailableAddress" />
        <form-bean name="provideRequest" type="com.wisor.talktalk.common.talktalkbean.RequestActionForm" />
    </form-beans>

    <action-mappings>
        <action path="/ttTestJsp" type="com.wisor.talktalk.controller.TestJsp" 
            name="getAvailableAddress" 
            scope="session" 
            validate="false" 
            unknown="false">
            <forward name="init" path="/WEB-INF/talk/preorderView/getAvailableAddress.jsp"/>
        </action>
    </action-mappings>

JSP Page:

<html:form action="/ttTestJsp.do?task=getResponse" styleClass="form">
        <fieldset>
            <label class="inline label" for="reseller_id"><fmt:message
                    key="label.field.resellerId" />:</label>
            <html:text
                property="getAvailableAddressRequest.resellerId"
                styleClass="mandatory" readonly="readonly"></html:text>
        </fieldset>
    <html:submit value="GetAddress"/>
    </html:form>

FormBean Main:

public class GetAvailableAddress extends ActionForm{
    private GetAvailableAddressRequest getAvailableAddressRequest;

    public void intilize(){
        getAvailableAddressRequest = new GetAvailableAddressRequest();
    }

    public GetAvailableAddressRequest getGetAvailableAddressRequest(){
        return this.getAvailableAddressRequest;
    }

    public void setGetAvailableAddressRequest(GetAvailableAddressRequest getAvailableAddressRequest){
        this.getAvailableAddressRequest = getAvailableAddressRequest;
    }
}

child Form Bean:

public class GetAvailableAddressRequest implements Serializable{

    private String resellerId;

    public String getResellerID(){
        return this.resellerId;
    }
    public void setResellerID(String resellerId){
        this.resellerId = resellerId;
    }
}

Action Class:

public class TestJsp extends Action {
Logger logger = Logger.getLogger(this.getClass());
@Override
public ActionForward execute( ActionMapping map, ActionForm actionForm,
        HttpServletRequest request, HttpServletResponse response) throws Exception{
ActionForward forward = null;
        GetAvailableAddress form = (GetAvailableAddress) actionForm;
form.intilize();
forward = map.findForward("init");
        return forward;
}}

It seems your getter and setter for ressellerId field are not properly named in GetAvailableAddressRequest class. You are using ID at the end of the method name instead of Id Corrected signatures below:

   public String getResellerId(){
        return this.resellerId;
    }
    public void setResellerId(String resellerId){
        this.resellerId = resellerId;
    }

Struts: No getter method for property name problem (Struts forum at , WebGroup E SRVE0026E: [Servlet Error]-[No getter method for property itemDetails of bean farmPermitForm]: javax.servlet.jsp.JspException:� javax.servlet.jsp.JspException: No getter method for property reqKickOffMeet of bean org.apache.struts.taglib.html.BEAN. Everything is fine.There is no case sensitive issue also .But this code is not working.Kindly help me to fix this. JSP:

Remember that the property name of the input tag must match with a getter method name in the action form

sample : in the jsp

<html:textarea property="productDescription" rows="15" cols="50" >
</html:textarea> 

in the action form

public String getProductDescription() {
    return productDescription;
}

javax.servlet.jsp.JspException: ServletException (No getter method , javax.servlet.jsp.JspException: No getter method for property jsonData of bean org.apache.struts.taglib.html.BEAN I'm not sure as too the error,� Javax.servlet.jsp.JspException: No getter method for property jsonData of bean org.apache.struts.taglib.html.BEAN. Also, the proper form object is being used, as the other properties/getters/setters work, albeit through a single getter method that looks up data in a hashmap.

To others being redirected here: first check all your variable/method names.

The problem for me was that the Form Bean requested the values from the POJO class(the class with getters and setters) in order to display the initial jsp; since they had no value to begin with, they returned a null, making the jsp think there's no getter.

Just set a default value, even "".

public class GetAvailableAddressRequest implements Serializable{

//private String resellerId;
private String resellerId = "defaultValue";

public String getResellerID(){
    return this.resellerId;
}
public void setResellerID(String resellerId){
    this.resellerId = resellerId;
}

This fixed it for me!

javax.servlet.jsp.JspException: No getter method for property ad of be, private String ad=null; and also the getters & setters method. but am geting the follwoing error javax.servlet.jsp.JspException: No getter� Struts Indexed Property — no getter method found for property. 1564. javax.servlet.jsp.JspException: No getter method available for property. Hot Network Questions

[#STR-622] "No getter method for property xxx of bean yyyy" while , ServletException javax.servlet.jsp.JspException: No getter method for property fEmision of bean datosComplemForm at org.apache.struts.util. javax.servlet.jsp.JspException: No getter method available for property CardType for bean under name org.apache.struts.taglib.html.BEAN. The code works fine outside of portal when just using strut tags instead of the pdk struts tags ? 1111 Views

pm16164: jspexception: no getter method for property serverlevel of bean when creating a new servlet cache instance

I had my jsp and displaybean working and displaying contents properly. Now I just added a new field for displaybean and I am getting an javax.servlet.jsp.JspException: No getter method for property: "lRating" of bean: "URLDisplayBean" I added this field "lRating" and proper setter and getter methods in class URLDisplayBean.java.