如何访问HttpServletRequest,HttpServletResponse或者HttpSession有两种方法可以达到效果,使用ActionContext:
Map attibutes = ActionContext.getContext().getSession();
或者实现相应的接口:
HttpSession SessionAware
HttpServletRequest ServletRequestAware
HttpServletResponse ServletResponseAware
Map attibutes = ActionContext.getContext().getSession();
或者实现相应的接口:
HttpSession SessionAware
HttpServletRequest ServletRequestAware
HttpServletResponse ServletResponseAware