struts2 Action中获取request, response对象的方法
ActionContext ctx = ActionContext.getContext();
HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
HttpServletResponse response = (HttpServletResponse)ctx.get(ServletActionContext.HTTP_RESPONSE);
//ServletActionContext.APPLICATION;
//ServletActionContext.SESSION;
//ServletActionContext.PAGE_CONTEXT;
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yuansicau/archive/2008/09/03/2874776.aspx