Struts跳转配置

在Action中配置跳转时,如下设置

ActionForward af = null; 

af = mapping.findForward("success");

return af;

 

struts-config.xml中

 <global-forwards>
     <forward name="success" path="/pages/common/success.jsp"></forward>
  </global-forwards>

或者

<action path="/login" input="/login.jsp" name="loginForm" type="com.cw.struts.action.LoginAction">
    <forward name="fail" path="/login.jsp"></forward>
  </action>

posted @ 2013-06-24 23:06  骑着骆驼逛沙漠  阅读(130)  评论(0编辑  收藏  举报