struts2 Action中获取request, response对象的方法
- ActionContext ctx = ActionContext.getContext();
-
- HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
-
- HttpServletResponse response = (HttpServletResponse)ctx.get(ServletActionContext.HTTP_RESPONSE);
-
-
-
-