ActionRedirect是ActionForward 的一个子类,其设计来用于重定向请求,支持在运行时添加参数,用来重定向request,支持运行时URL传递的参数。
public ActionForward perform(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
.................

String sPath = "/main/login.do";
ActionRedirect forward = new ActionRedirect(null, sPath, "");

forward.addParameter("userName", name);
forward.addParameter("password", password);

return forward;
}













