读书人

struts2 Action中获取request, respon

发布时间: 2012-09-05 15:19:34 作者: rapoo

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

读书人网 >软件架构设计

热点推荐