В запросе, например:
Код: Выделить всё
myapp.com/view.do?method=search
Код: Выделить всё
public ActionForward search(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception{
request.setAttribute("RESULT","PERU");
return mapping.findForward("home");
}
Код: Выделить всё
myapp.com/view.do?method=search
Код: Выделить всё
public ActionForward search(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)throws Exception{
request.setAttribute("RESULT","PERU");
ActionForward af = new ActionForward(mapping.findForward("home"));
af.setRedirect(true);
return af;
}
Когда я использую setRedirect(), Struts 1 делает новый запрос, я теряю все атрибуты.
Какая-либо другая форма очистки URL-адреса в ActionForward?
Подробнее здесь: https://stackoverflow.com/questions/264 ... n-struts-1
Мобильная версия