日期:2014-05-20  浏览次数:20672 次

struts 1.2 跳转 action 到另一个action
我实现的是 从一个 struts中的action 控制页面 跳到 另一个 action控制页面 怎么实现
例如:
public class DealChooseCourseAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {


}
  }
跳转到 到
public class ChooseCourseAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {


}
}
请高手指点 给出解决的代码 多谢

------解决方案--------------------
你在A action中,return mapping.findForward("XXXX");
在struts-config.xml中,配置<forward name="XXXX" path="/B.do" />,就跳转到B action了