读书人

struts1.2中从一个action跳转到除此以

发布时间: 2012-11-21 08:23:26 作者: rapoo

struts1.2中从一个action跳转到另外一个action
在action的方法的最后,一般情况下都使用return mapping.findForward("xxxxx");

如果想跳转到另外一个action的某个页面,可以这样:

ActionForward actionForward = new ActionForward();
actionForward.setPath("/customer/creditApprManage.do?method=searchCreditLevel&levelName=");
return actionForward;



注:如果需要重定向,只需要给actionForward加一个redirect属性,使用actionForward.setRedirect(true);

读书人网 >编程

热点推荐