session在servlet中的使用;
session对象: HttpSession session = request.getSession();
设置session: session.setAttribute("usrid", userid);
获取session: session.getAttribute("usrid");
session在action中的使用:
session对象: ActionContext ct = ActionContext.getContext();
Map<String, Object> session = ct.getSession();
设置session: session.put("username", username);
获取session: session.get("username");