小小六

学无止境

Servlet&JSP学习之servlet属性和监听(2)_八大太监(监听)

Servlet的8大太监(监听)

场景 监听者接口 事件类型
     
你想知道一个WEB应用是否添加删除替换了一个上下文属性 Javax.servlet.ServletContextAttributeListener
attributeAdded
attributeRemoved
attributeReplaced
ServletContextAttributeEvent
你想知道什么时候添加删除或者替换一个请求属性 Javax.servlet.ServletRequestAttributeListener
attributeAdded
attributeRemoved
attributeReplaced
ServletRequestEvent
你想知道什么时候添加删除或者替换一个会话属性 javax.servlet.http.HttpSessionAttributeListener
attributeAdded
attributeRemoved
attributeReplaced
HttpSessionBindingEvent
     
每次请求到来你都想知道,以便建立日志记录或者干点初始化之类的事情 Javax.servlet.ServletRequestListener
requestInitialized
requeseDestoryed
ServletRequestEvent
你想知道有多少个并发用户,也就是说,你想跟踪活动会话 javax.servlet.http.HttpSessionListener
sessionCreated
sessionDestoryed

HttpSessionEvent
你想知道是否创建或者撤销了一个上下文 javax.servlet.ServletContextListener
contextInitialized
contextDestoryed
ServletContextEvent
     
你有一个属性类(这个属性类的对象将被放在一个属性中),而且你希望这个类型的对象绑定到一个会话或从一个会话删除时得到通知 javax.servlet.http.HttpSessionBindingListener
valueBound
valueUnbound
HttpSessionBindingEvent
你有一个属性类,而且你喜欢子属性对象绑定的会话迁移到另一个JVM时得到通知 javax.servlet.http.HttpSessionActivationListener
sessionDidActivate
sessionWillPassivate
HttpSessionEvent

posted on 2008-12-23 18:48 peterJ 阅读(321) 评论(0)  编辑  收藏 所属分类: Servlet&JSP


只有注册用户登录后才能发表评论。


网站导航:
 
<2008年12月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

导航

统计

常用链接

留言簿(1)

随笔分类

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜