思路:
在用户登入位置将用户关键信息(如用户名)(但最好不要使用密码等私密信息)传入session中储存,以证明该用户登入
在用户操作的每一个页面都进行验证session值是否存在,若存在,则继续用户操作,若为某一设定特殊值或不存在
则退出并跳转至登入界面,若用户希望主动注销,则将session中值赋值为特殊值或清空
另外,在webconfig 页面中可以对session的时间进行设定