从 JSF2 上下文 的到 servlet相关 session request

FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("MyBeanMyValue", myValue);

FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("MyBeanMyValue");

((HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest()).getSession().getAttribute("user");

你可能感兴趣的:(servlet)