当前位置: 代码迷 >> Java Web开发 >> 关于struts 提交form后无法调用action解决办法
  详细解决方案

关于struts 提交form后无法调用action解决办法

热度:7533   发布时间:2013-02-25 21:18:07.0
关于struts 提交form后无法调用action
Java代码 
HTML code
<html:form action="/userAction/showUserList.do">      <html:submit>显示所有用户</html:submit>      </html:form>   <html:form action="/userAction/showUserList.do">    <html:submit>显示所有用户</html:submit>    </html:form>
上面是我的提交 
下面是struts配置 
Java代码 
XML code
<action path="/userAction/showUserList"          type="usermodule.UserAction"          name="userForm"          parameter="showUserList"          scope="request"          input="/root/user/userlist.jsp">           <forward name="success" path="/root/user/userlist.jsp"></forward>   </action>  
然后点击显示所有用户后有没输出信息 
下面是jsp页面 
Java代码 
HTML code
<table>           <tr>             <td>登陆名 </td>             <td>真实姓名 </td>             <td>EMAIL</td>           </tr>              <logic:present name="userList">              <logic:iterate id="UserForm" name="userList" type="usermodule.DBUser">                <tr>                  <td>                    <bean:write name="UserForm" property="username"/>                  </td>                  <td>                    <bean:write name="UserForm" property="realname"/>                  </td>                  <td>                    <bean:write name="UserForm" property="email"/>                  </td>                </tr>              </logic:iterate>              </logic:present>              <tr><td>              <html:form action="/userAction/showUserList.do">                <html:submit>显示所有用户</html:submit>              </html:form>              </td></tr>       </table>  <table>        <tr>          <td>登陆名 </td>          <td>真实姓名 </td>          <td>EMAIL</td>        </tr>           <logic:present name="userList">           <logic:iterate id="UserForm" name="userList" type="usermodule.DBUser">             <tr>               <td>                 <bean:write name="UserForm" property="username"/>               </td>               <td>                 <bean:write name="UserForm" property="realname"/>               </td>               <td>                 <bean:write name="UserForm" property="email"/>               </td>             </tr>           </logic:iterate>           </logic:present>           <tr><td>           <html:form action="/userAction/showUserList.do">             <html:submit>显示所有用户</html:submit>           </html:form>           </td></tr>    </table>
我在action中设置了断点,调试时发现根本就没有进入到action类不明白啊,又没有显示错误 
[code=HTML][/code]

------解决方案--------------------------------------------------------
探讨
不能说固执,只是不知道到底怎样做好,也没有人说啊
  相关解决方案