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();
原文:http://www.cnblogs.com/langdangyunliu/p/4172573.html