Using Request object in a validate method STRUTS
Is it possible to set an attribute in a request or session scope in a HttpServletRequest object of a validate method in Struts.
Example:
@Override
public ActionErrors validate(ActionM开发者_开发问答apping mapping, HttpServletRequest request){
ActionErrors ae = new ActionErrors();
request.getSession().setAttribute("unit", request.getParameter("unit"));
}
Because ive been trying this and it is not working in my jsp. If it is not working then what is the purpose of this object in this method.
加载中,请稍侯......
精彩评论