3

I search for long time to this issue.But still i didn't get the solution.Kindly help me to this problem. I have one JSP file and using struts for my application.When i try to load the page in browser it throws this error.

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:

<TD class="fontclr1" colspan="2">Requirements Kick-off meeting:</TD>
                        <TD align="center"><html:select name="CdrQueryForm"
                        property="test0"
                        onchange="javascript:select('reqKickOffMeet','Requirements Kick-off meeting',this,1);">
                        <html:option value="EqualTo">Equal to</html:option>
                        <html:option value="GreaterThan">Greater than</html:option>
                        <html:option value="LessThan">Less than</html:option>
                        <html:option value="Between">Between</html:option>
                    </html:select></TD>

and my class file

private String reqKickOffMeet;

public String getReqKickOffMeet() {
    return reqKickOffMeet;
}
public void setReqKickOffMeet(String reqKickOffMeet) {
    this.reqKickOffMeet = reqKickOffMeet;
}
Aleksandr M
  • 24,264
  • 12
  • 69
  • 143
Muthu kader
  • 119
  • 1
  • 4
  • 13

2 Answers2

0

From the error it seems you are trying to load some property reqKickOffMeet from bean in the jsp. Check if the getter and setter methods are there in the class which holds this property.

Also you would like to check the signature of the getter and setters are correct. Like

for property reqKickOffMeet

public String getReqKickOffMeet(){
 return reqKickOffMeet;
}

public void setReqKickOffMeet(String reqKickOffMeet){
 this.reqKickOffMeet = reqKickOfMeet;
}

Also if it still doesnt work, try renaming your variable to reqKickoffmeet (starting from smaller case and just one upper case letter in between)

Sumeet Sharma
  • 2,573
  • 1
  • 12
  • 24
0

I believe property element of html:select must match reqKickOffMeet. I had the same issue, my scenario was:

<html:select property="dontVerifyDependents" styleClass="body">
 <html:options collection="dontVerifyDependentsOptions" 
               labelProperty="listValue" property="listId" />
</html:select>

Instead of dontVerifyDependents I had dontVerifyDependency and was getting the same error.

My class file:

private String dontVerifyDependents;

public void setDontVerifyDependents(String dontVerifyDependents) {
    this.dontVerifyDependents = dontVerifyDependents;
}

public String getDontVerifyDependents() {
    return dontVerifyDependents;
}

You should replace property="test0" for property="reqKickOffMeet".

Hope it works!

matiaslezin
  • 113
  • 1
  • 2
  • 7