1、session的添加
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext extContext =facesContext.getExternalContext();
this.session =(HttpSession)extContext.getSession(true);
this.session.setAttribute("user", this.userName);
this.session.setAttribute("currentUser", loboUser);
2、session的读取
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext extContext =facesContext.getExternalContext();
HttpSession session =(HttpSession)extContext.getSession(true);
//mes.setMesOperator(session.getAttribute("user").toString());
String user = session.getAttribute("user").toString();
Integer.parseInt(request.getParameter("note_id"));