网页显示这个错误 org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/basic.jsp at line 2017:        </h2>
18:     
19: 
20:     <html:form action="/a.do"  method="post">
21: 
22:       your name:
23:       <html:text property="name" size="16" maxlength="16"  />
控制台显示 
javax.servlet.jsp.JspException: Cannot retrieve definition for form bean demoForm on action /a.do 错误 struts-config.xml 配置如下
<form-beans>        <form-bean name="DemoForm" type="demo.form.DemoForm"/>
    </form-beans>
  <action    path      = "/a"
               type      = "demo.action.BasicAction"
               name      = "demoForm"
               scope     = "session"            
     >
        <forward name="basicdemo" path="/jsp/add.jsp" />
 
  </action>
怎么就不显示jsp呢 

解决方案 »

  1.   

    你的action配置文件里面的name属性DemoForm的首字母D大写
      

  2.   

     <form-bean name="DemoForm" type="demo.form.DemoForm"/>name = "demoForm"
    要区分大小写的。
      

  3.   

    还有这个地方<html:form action="/a.do" method="post">
    要加“/”吗?
      

  4.   

    <html:form action="a.do" method="post">
      

  5.   

    对,是这样写的。<html:form action="a.do" method="post">
    还有,大小写的命名一定也要注意呀。
      

  6.   

    去掉.do
    你的web.xml里边的servlet已经映射为*.do了
      

  7.   

    用不就不用 struts1 标签,用普通的 html 表单
      

  8.   

    1、 <html:form action="/a.do" method="post">中的.do去掉
    2、  <action path = "/a"
      type = "demo.action.BasicAction"
      name = "demoForm"
      scope = "session"   
      >中的name改成"DemoForm"
      

  9.   

    1。action中的path用的是虚拟路径需要加"/",不需要加.do
    2. form-bean中的name是唯一标示,和action中的name必需一致.