监听器
来源:互联网 发布:淘宝哪个零食店好 编辑:程序博客网 时间:2024/06/18 05:01
/denglu/src/com/listener/HttpSessionAttributeListener.java
package com.listener;
import javax.servlet.http.HttpSessionBindingEvent;public class HttpSessionAttributeListener implements javax.servlet.http.HttpSessionAttributeListener {
@Override
public void attributeAdded(HttpSessionBindingEvent HttpSessionBindingevent) {
System.out.println("HttpSession_attributeAdded name:"+HttpSessionBindingevent.getSession().getAttribute("name"));
//System.out.println("HttpSession_attributeAdded pwd:"+HttpSessionBindingevent.getSession().getAttribute("pwd"));
}
@Override
public void attributeRemoved(HttpSessionBindingEvent HttpSessionBindingevent) {
System.out.println("HttpSession_attributeRemoved name:"+HttpSessionBindingevent.getSession().getAttribute("name"));
//System.out.println("HttpSession_attributeRemoved pwd:"+HttpSessionBindingevent.getSession().getAttribute("pwd"));
}
@Override
public void attributeReplaced(HttpSessionBindingEvent HttpSessionBindingevent) {
System.out.println("HttpSession_attributeReplaced name:"+HttpSessionBindingevent.getSession().getAttribute("name"));
//System.out.println("HttpSession_attributeReplaced pwd:"+HttpSessionBindingevent.getSession().getAttribute("pwd"));
}
}
/denglu/src/com/listener/HttpSessionListener.java
package com.listener;
import javax.servlet.http.HttpSessionEvent;
public class HttpSessionListener implements javax.servlet.http.HttpSessionListener {
@Override
public void sessionCreated(HttpSessionEvent HttpSessionevent) {
System.out.println("sessionCreated");
}
@Override
public void sessionDestroyed(HttpSessionEvent HttpSessionevent) {
System.out.println("sessionCreatedDestroyed");
}
}
阅读全文
0 0
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- 监听器
- dojo/request 出现tomcat报错 error parsing HTTP request header Note: further occurrences of HTTP header..
- Oracle学习笔记(一)
- eclipse jdk 和jcop安装和配置
- java使用DeBug以及开发者工具 快速定位系统的bug
- WPF ItemContainerGenerator.ContainerFromItem返回Null
- 监听器
- React Native 学习资源精选仓库
- Android调用摄像头和相册
- 阿里巴巴成立“达摩院” 引入顶尖科学家3年研发投入将超千亿
- 数据结构:实验二线性表综合实验④静态链表
- 精彩题目收集-javascript(第一卷)
- which命令
- [初学笔记] matlab中 函数m文件创立,匿名函数的建立和调用
- hadoop2.4.1配置时出现域名解析失败的解决方法