解决了自己的两个struts问题,记录下来

类别:Java 点击:0 评论:0 推荐:

1..............
root cause

javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
 org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:709)
 org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:417)
 org.apache.jsp.FormBasic_jsp._jspx_meth_html_form_0(FormBasic_jsp.java:134)
 org.apache.jsp.FormBasic_jsp._jspx_meth_html_html_0(FormBasic_jsp.java:98)
 org.apache.jsp.FormBasic_jsp._jspService(FormBasic_jsp.java:68)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


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


后来发现是下面这句少了 "/",也就是<forward>元素的结束符号
 <forward name="success" path="/FormBasic.jsp">
 
2..........................tomcat 提示
No getter method available for property checkBox1 in CheckBoxForm bean

 我仔细检查了半天jsp代码中,<html:checkbox property="checkbox1" />,甚至改动了java bean程序,
 却忽略了jsp后面部分的
 
  <bean:write name="CheckBoxForm" property="checkBox1" />
 
  原来是大小写错误,该打,诶~~~~~~

本文地址:http://com.8s8s.com/it/it11551.htm