简体   繁体   English

javax.servlet.jsp.JspException:Bean org.apache.struts.taglib.html.BEAN的属性xxx没有获取方法

[英]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.

相关问题 struts错误-org.apache.jasper.JasperException:javax.servlet.ServletException:javax.servlet.jsp.JspException:找不到bean - struts error- org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean javax.servlet.jsp.JspException:没有可用于属性的getter方法 - javax.servlet.jsp.JspException: No getter method available for property javax.servlet.jsp.JspException: 没有属性的 getter 方法 - javax.servlet.jsp.JspException: No getter method for property 在任何范围内都找不到bean org.apache.struts.taglib.html.BEAN - Cannot find bean org.apache.struts.taglib.html.BEAN in any scope org.apache.jasper.JasperException:javax.servlet.ServletException:javax.servlet.jsp.JspException:找不到名称为air_name的bean - org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean under name airline_name javax.servlet.jsp.JspException:在任何范围内找不到 bean:“CommentsUpdated” - javax.servlet.jsp.JspException: Cannot find bean: "CommentsUpdated" in any scope javax.servlet.jsp.JspException:无法检索表单bean的定义,原因:java.lang.NullPointerException - javax.servlet.jsp.JspException: Cannot retrieve definition for form bean, Caused by: java.lang.NullPointerException javax.servlet.jsp.JspException:找不到集合 - javax.servlet.jsp.JspException: No collection found javax.servlet.jsp.JspException:Tomcat 5.5中的javax / el / ValueExpression - javax.servlet.jsp.JspException: javax/el/ValueExpression in Tomcat 5.5 异常“javax.servlet.jsp.JspException: Broken pipe”是什么意思? - What does the exception “javax.servlet.jsp.JspException: Broken pipe” signify?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM