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();