JAVA_Web_Listener
2016-03-22 21:38
441 查看
监听器
1.概念(1)本身是一个对象 (2)监听其他对象 (3)响应其他对象
2.用途
(1)统计在线人数和在线用户 (2)系统启动时加载初始化信息 (3)统计网站访问量 (4)跟Spring结合的操作
3.启动顺序
(1)多个监听器:按注册顺序 (2)优先级:监听器>过滤器>Servlet
4.分类
4.1按监听对象:
(1)ServletContextListener接口 (2)HttpSessionListener接口 (3)ServletRequestListener接口 方法:initial()/destroyed()
4.2按对象属性:
(1)ServletContextAttributeListener接口 (2)HttpSessionAttributeListener接口 (3)ServletRequestAttributeListener接口 方法: attributeAdded()/attributeRemoved()/attributeReplaced
相关文章推荐
- java:double四舍五入并保留两位小数的方法
- Java初学者需掌握的30个基本概念
- Java并发编程:volatile关键字解析
- struts自定义类型转换器,局部和全局
- java基础回顾笔记-io流2
- maven创建web工程Spring配置文件找不到问题解决方案
- 解决maven项目update project会更改jdk版本问题
- Spring与策略模式
- 一个GIS专业java实习生的日记——上班第一天
- Spring的JdbcTemplate
- Class [org.springframework.transaction.config.TxNamespaceHandler] for namespace
- Spring中的传统AOP开发
- spring AOP 两种底层实现( JDK动态代理 和 CGLIB代理)
- Java --- 异常处理和设计
- java中>,>>,>>> 的区别
- Spring中自动装配的三种方式
- Java中对象的内存分配问题
- java基础---->Zip压缩的使用(转)
- insertionSort()插入排序
- The connection to adb is down, and a severe error has occured. You must restart adb and Eclipse.Ple