struts2 Action中获取request, response对象的步骤

struts2 Action中获取request, response对象的方法struts2 Action中获取request,?response对象的方法?Acti

struts2 Action中获取request, response对象的方法

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;    
?