开发者

Struts - No getter method for bean property

开发者 https://www.devze.com 2023-01-01 13:19 出处:网络
I have a struts app with a jsp with the code: <input name=\"inrofol\" class=\"inputfilter\" id=\"inrofol\" size=\"22\" maxlength=\"20\" type=\"text\">

I have a struts app with a jsp with the code:

<input name="inrofol" class="inputfilter" id="inrofol" size="22" maxlength="20" type="text">

And even though it's not linked to the associated form bean, I get the exception:

Error 5开发者_如何学JAVA00: No getter method for property: "inrofol" of bean: "com.test.forms.CompForm"

Any hints ? Thanks


The No getter method for property: "inrofol" of bean: "com.test.forms.CompForm" message is coming from the org.apache.struts.taglib.TagUtils. There is no other class throwing that kind of message.

But since TagUtils just provides helper methods for Struts JSP tags, it means some Struts tag is using your "inrofol" field somewhere and trying to look for it in your bean.

Are you sure that "inrofol" is used only on this piece of code from your JSP?

<input name="inrofol" class="inputfilter" id="inrofol" size="22" maxlength="20" type="text">

Check your valComp.jsp file.


Please check you have the getters and setters correctly set.

Also have the form tag in strut's style as

<html:form>.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号