在struts的action中要使用session,直接从HttpServletRequest中获取
但BeanAction中formbean的业务处理方法无参,无法直接从HttpServletRequest获取session,可用以下方法:
HttpSession session = ActionContext.getActionContext().getRequest().getSession();
或者使用SessionMap
session过期
com.gingko.util.ValidateSessionTag
app.tld
安全
com.gingko.util.SessionAuthorizationFilter
web.xml
com.gingko.util.SessionAuthorizationFilter
[@more@]
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/777981/viewspace-900405/ ,如需转载,请注明出处,否则将追究法律责任。