如图,action下<result name="success" type="redirect">/userquery.action</result>,这样在点击提交时,程序正常运行,但是表单中的数据没用。
但是同样type=“redirect”的删除、更新的action就能执行成功。
<package name="struts2" extends="struts-default">
<action name="login" class="loginAction">
<result name="success">/success.jsp</result>
<result name="failer">/error.jsp</result>
</action>
<action name="user" class="userAction">
<result name="success" type="redirect">/userquery.action</result>
</action>
<action name="userquery" class="userQueryAction">
<result name="success">/query.jsp</result>
</action>
<action name="userdelete" class="userDeleteAction">
<result name="success" type="redirect">/userquery.action</result>
</action>
<action name="userupdate" class="userUpdateAction">
<result name="success" type="redirect">/userquery.action</result>
<result name="input">/update.jsp</result>
</action>
</package>
Caballarii