首页 > 代码库 > zk 获取session,request,servletContext(参考:http://www.dotblogs.com.tw/rockywang/archive/2010/01/13/12995.aspx)

zk 获取session,request,servletContext(参考:http://www.dotblogs.com.tw/rockywang/archive/2010/01/13/12995.aspx)

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

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

 

ServletContext sc =

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

 

HttpServletRequest request =

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

zk 获取session,request,servletContext(参考:http://www.dotblogs.com.tw/rockywang/archive/2010/01/13/12995.aspx)