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
  • 相关阅读:
    HTML中一定会常用的标签和标签属性(这是网页构成的重要元素
    HTML(超文本语言)
    SQL SERVER中视图、事务
    important覆盖行内样式
    线性渐变
    「JavaScript面向对象编程指南」闭包
    移动端文章图片大小限制
    Vue中ajax返回的结果赋值
    「JavaScript面向对象编程指南」基础
    JS媒体查询
  • 原文地址:https://www.cnblogs.com/chenxiaocai/p/5281267.html
Copyright © 2011-2022 走看看