attributeAdded(ServletContextAttributeEvent event) 向appliction中添加属性时调用
attributeRemoved(ServletContextAttributeEvent event) 从appliction中删除属性时调用
attributeReplaced(ServletContextAttributeEvent event) 替换application中的属性时调用
HttpSessionAttributeListener
attributeAdded(HttpSessionBindingEvent event)
attributeRemoved(HttpSessionBindingEvent event)
attributeReplaced(HttpSessionBindingEvent event)
ServletRequestAttributeListener
attributeAdded(ServletRequestAttributeEvent event)
attributeRemoved(ServletRequestAttributeEvent event)
attributeReplaced(ServletRequestAttributeEvent event)
以上监听器接口除了传参不同,方法名都是一样的。分别监听application,session,request对象的属性变化。