开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜