struts2.0全局跳转,局部跳转,全局异常..
2.struts2.0的全局跳转 <global-results> <result name=”ok”>/ok.jsp</result> </global-results>3.struts2.0的局部跳转: <action name=”login” class=”dd.login”> <result name=”ok”>/ok.jsp</result> </action>4.全局异常: <global-exception-mappings> <exception-mapping result=”error” exception=”java.lang.Exception”/> </global-exception-mappings> 要在<global-results> <result name="error">/error.jsp</result> </global-results>5.在action中指明该action处理的方法: <action name=”login” class=”xxx.loginAction” method=”login”> <result name=”ok”>/ok.jsp</result> </action>6.在action中跳转到其他的action <result name=”ok” type=”chain”>list</result>7.在action中重定向到其他的界面:<result name=”error” type=”redirect”>/error.jsp</result>
版权归本人所有不得随意转载,如有问题请发送邮件到RedArmy.Chen@gmail.com
未经本人同意转载该文章要负法律责任