[英]javax.servlet.jsp.JspException: No getter method for property xxx of bean org.apache.struts.taglib.html.BEAN
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.
我有一个JSP文件并在应用程序中使用struts。当我尝试在浏览器中加载页面时,它将引发此错误。
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: 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;
}
From the error it seems you are trying to load some property reqKickOffMeet
from bean in the jsp. 从错误看来,您似乎正在尝试从jsp中的bean加载一些属性
reqKickOffMeet
。 Check if the getter and setter methods are there in the class which holds this property. 检查拥有此属性的类中的getter和setter方法是否存在。
Also you would like to check the signature of the getter and setters are correct. 另外,您还想检查吸气剂的签名和设置器是否正确。 Like
喜欢
for property reqKickOffMeet
用于属性
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) 另外,如果仍然无法正常运行,请尝试将变量重命名为
reqKickoffmeet
(从小写字母开始,中间只有一个大写字母)
I believe property element of html:select must match reqKickOffMeet. 我相信html:select的 property元素必须匹配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. 相反dontVerifyDependents的我有dontVerifyDependency,并得到同样的错误。
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" . 您应该将property =“ test0”替换为property =“ reqKickOffMeet” 。
Hope it works! 希望它能起作用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.