写入session,可以构建一个存取session的类(如account),用如下方式放入到session中
this.getSessionScope().put("jalacc", account);
获取session(如例)
if(this.getSessionScope().get("jalacc") != null){
UserSession acc = (UserSession)this.getSessionScope().get("jalacc");
System.out.println(acc.getUserid());
}