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
  • 相关阅读:
    PS初步学习经验心得记录
    css第四天--复合选择器和样式三大特性
    css第三天--盒子模型
    html第二天--表单控件和表格
    css第二天--字体属性和文本属性
    vue计算属性(computed)
    ant-input的使用
    js-split() 方法
    设计转到前端开发
    $set
  • 原文地址:https://www.cnblogs.com/chenxiaocai/p/5281267.html
Copyright © 2011-2022 走看看