登陆:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <% request.getSession().setAttribute("user","wangfeng"); %> 用户已经登录
退出:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <% request.getSession().removeAttribute("user"); %> 用户已经退出登录