actionform的属性大小写问题

今天开发中碰到一个问题,struts的html标签对应actionform,其中标签属性和actionformjavabean属性要保持一致,而且要不全小写,要不全大写,比如:
passwordtrue
PASSWORDtrue
Passwordfalse
pASSWORDfalse

 

如果是大小混写的,则:打开jsp页面的时候(actionservlet会根据actionmapping马上组装相应的actionform)就会500错误

HTTP Status 500 -


type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: No getter method for property PASs of bean org.apache.struts.taglib.html.BEAN
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
	org.apache.jsp.form.case_jsp._jspService(org.apache.jsp.form.case_jsp:91)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

 

root cause

javax.servlet.jsp.JspException: No getter method for property PASs of bean org.apache.struts.taglib.html.BEAN
	org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)
	org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:176)
	org.apache.jsp.form.case_jsp._jspx_meth_html_text_0(org.apache.jsp.form.case_jsp:144)
	org.apache.jsp.form.case_jsp._jspx_meth_html_form_0(org.apache.jsp.form.case_jsp:112)
	org.apache.jsp.form.case_jsp._jspService(org.apache.jsp.form.case_jsp:81)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

 

note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.


Apache Tomcat/5.5

原来还有这个限制

同时发现通过hibernate tools插件自动按照数据表生成javabean也很方便,而且没有像hibernate synchernize一定要生成basejavabean,生成的javabean的属性也都是小写的,不错。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值