HttpSessionListener监听session的创建及销毁,实现在线用户统计

上传者: u011760792 | 上传时间: 2022-11-18 16:32:01 | 文件大小: 361KB | 文件类型: RAR
用户登录时,调用LoginServlet,将用户名写入application的在线用户列表中,用户退出时,调用LogoutServlet,调用session.invalidate(),交给HttpSessionListener的sessionDestroyed()方法,将用户从在线列表中删除。 同理,session过期时,亦会调用session.invalidate(),交给HttpSessionListener的sessionDestroyed()方法,将用户从在线列表中删除

文件下载

资源详情

[{"title":"( 22 个子文件 361KB ) HttpSessionListener监听session的创建及销毁,实现在线用户统计","children":[{"title":"sessionServletWeb","children":[{"title":"WebContent","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 39B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 1.00KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"standard.jar <span style='color:#111;'> 384.04KB </span>","children":null,"spread":false},{"title":"jstl.jar <span style='color:#111;'> 16.53KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"result.jsp <span style='color:#111;'> 335B </span>","children":null,"spread":false},{"title":"index.jsp <span style='color:#111;'> 295B </span>","children":null,"spread":false},{"title":"logout.jsp <span style='color:#111;'> 162B </span>","children":null,"spread":false}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 345B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 84B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 505B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 503B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 364B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"servlet","children":[{"title":"LogoutServlet.java <span style='color:#111;'> 821B </span>","children":null,"spread":false},{"title":"LoginServlet.java <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false}],"spread":true},{"title":"listener","children":[{"title":"MySessionListener.java <span style='color:#111;'> 950B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 834B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"classes","children":[{"title":"servlet","children":[{"title":"LoginServlet.class <span style='color:#111;'> 2.18KB </span>","children":null,"spread":false},{"title":"LogoutServlet.class <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"listener","children":[{"title":"MySessionListener.class <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明