zk 获取session,request,servletContext,response

(参考:http://www.dotblogs.com.tw/rockywang/archive/2010/01/13/12995.aspx)

HttpServletRequest request = (HttpServletRequest) Executions.getCurrent().getNativeRequest();
HttpSession session = request.getSession(true);

HttpSession session = (HttpSession) Executions.getCurrent().getDesktop().getSession();

 

ServletContext sc =

(ServletContext) Sessions.getCurrent().getWebApp().getNativeContext();

 

HttpServletRequest request =

(HttpServletRequest) Executions.getCurrent().getNativeRequest();

 

HttpServletResponse response = (HttpServletResponse)Executions.getCurrent().getNativeResponse();

posted @ 2014-12-18 19:49  浪荡云流  阅读(635)  评论(0编辑  收藏  举报