zoukankan      html  css  js  c++  java
  • Servlet监听器

    一、servlet的8个监听器

    场景 监听者接口 事件类型
    你想知道一个web应用上下文中是否增加、删除或替换了一个属性
    javax.servlet.ServletContextAttributeListener
    attributeAdded
    attributeRemoved
    attributeReplaced
    ServletContextAttributeEvent
    你想知道有多少个并发用户,也就是说,你想跟踪活动的会话
    javax.servlet.http.HttpSessionListener
    sessionCreated
    sessionDestroyed
    HttpSessionEvent
    每次请求到来时你都想知道,以便建立日志记录
    javax.servlet.ServletRequestListener
    requestInitialized
    requestDestroyed
    ServletRequestEvent
    增加、删除或替换一个请求属性时你希望能够知道
    javax.servlet.ServletRequestAttributeListener
    attributeAdded
    attributeRemoved
    attributeReplaced
    ServletRequestAttributeListener
    你想知道一个web应用上下文中是否增加、删除或替换了一个属性
    javax.servlet.ServletContextAttributeListener
    attributeAdded
    attributeRemoved
    attributeReplaced
    ServletContextAttributeEvent
    你有一个属性类,而且你希望这个类型的对象在绑定到一个会话或从会话中或从会话删除时得到通知
    javax.servlet.HttpSessoinBindingListener
    valueBound
    valueUnbound
    HttpSessionBindingEvent
    增加、删除或添加一个会话属性时你希望能够知道
    javax.servlet.HttpSessionAttributeListener
    attributeAdded
    attributeRemoved
    attributeReplaced
    ServletContextAttributeEvent
    你想知道是否创建或撤销了一个上下文
    javax.servlet.ServletContextListener
    contextInitializated
    contextDestroyed
    ServletContextEvent
  • 相关阅读:
    对百度搜索引擎的评论
    团队开发个人总结05
    Bootsrap下拉菜单实现Hover下拉效果
    C#抽奖优惠券生成唯一码方法
    js.live方法无效, 报错:uncaught TypeError: $(...).live is not a function
    SQL 插入一条自定义主键值的数据
    一款很简单的直接发送邮件功能
    SQL生成指定范围内随机值
    SQL(replace)替换字段中指定的字符
    SQL表中删除一列
  • 原文地址:https://www.cnblogs.com/chenxiaocai/p/5281267.html
Copyright © 2011-2022 走看看