如何访问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
本文介绍两种访问HttpServletRequest、HttpServletResponse及HttpSession的方法:一是通过ActionContext获取会话;二是实现特定接口如HttpSessionSessionAware等。
3556

被折叠的 条评论
为什么被折叠?



