1得到request

1.1  HttpServletRequest request=ServletActionContext.getRequest();

 

 

2得到response

2.1  HttpServletResponse response=ServletActionContext.getResponse();

 

 

3得到session

3.1  HttpSession session=ServletActionContext.getRequest().getSession();

3.2  protected String doIntercept(ActionInvocation invocation) throws Exception {
          ActionContext ac=invocation.getInvocationContext();
          Map<String, Object> session=ac.getSession();            //放的session是一个真实的,我去出来的时候用的是一个解耦的。完全可以取出来
          return null;
      }

4得到application

ServletContext application=ServletActionContext.getServletContext();

 

posted on 2015-10-03 21:32  菜鸟乙  阅读(236)  评论(0编辑  收藏  举报