ActionContext ctx = ActionContext.getContext();
HttpServletRequest request = (HttpServletRequest) ctx
.get(ServletActionContext.HTTP_REQUEST);
ActionContext ctx = ActionContext.getContext();
HttpServletReponse response= (HttpServletResponse) ctx
.get(ServletActionContext.HTTP_RESPONSE);
在Struts2中得到
HttpServletRequest对象 HttpServletResponse 对象