标签:
对application监听,实际上就是对ServletContext(Servlet上下文)监听,主要使用ServletContextListener和ServletContextAttributeListener两个接口。
上下文状态监听:ServletContextListener
ServletContextListener接口的定义
在上下文状态监听操作中,一旦触发了ServletContextListener接口的定义的事件后,可以通过ServletContextEvent进行事件的处理。
关于不同的Servlet的配置
上下文属性监听:ServletContextAttributeListener
ServletContextAttributeListener接口定义的方法
ServletContextAttributeEvent事件定义的方法
1.session状态监听:HttpSessionListener接口
HttpSessionListener接口定义的方法
HttpSessionEvent事件定义的方法
2.session属性监听:HttpSessionAttributeListener接口
HttpSessionAttributeListener接口定义的方法
HttpSessionBindingEvent事件定义的方法
3.session属性监听:HttpSessionBindingListener接口
HttpSessionBindingListener接口实现的监听程序可以不用配置而直接使用。
HttpSessionBindingListener接口定义的方法
1.请求状态监听:ServletRequestListener接口
ServletRequestListener接口定义的方法
ServletRequestEvent事件定义的方法
2.request属性监听:ServletRequestAttributeListener接口
ServletRequestAttributeListener接口定义的方法
ServletRequestAttributeEvent事件定义的方法
标签:
原文地址:http://blog.csdn.net/winfredzen/article/details/51210282