② 监听域对象中的属性的增加和删除的事件监听器 ServletContextAttributeListener接口 public void
attributeAdded(ServletContextAttributeEvent scae) public void
attributeReplaced(ServletContextAttributeEvent hsbe) public void
attributeRmoved(ServletContextAttributeEvent srae)
HttpSessionAttributeListener 接口 public void
attributeAdded(HttpSessionBindingEvent scae) public void
attributeReplaced(HttpSessionBindingEvent hsbe) public void
attributeRmoved(HttpSessionBindingEvent srae)
ServletRequestAttributeListener接口 public void
attributeAdded(ServletRequestAttributeEvent scae) public void
attributeReplaced(ServletRequestAttributeEvent hsbe) public void attributeRmoved(Attributiveness
srae) ③ 监听绑定到 HttpSession 域中的某个对象的状态的事件监听器接口
HttpSessionBindingListener接口, JavaBean 对象可以感知自己被绑定到 Session 中和从 Session 中删除的事件 void valueBound(HttpSessionBindingEvent event) , 当前对象被添加到session中 void valueUnbound(HttpSessionBindingEvent
event),当前对象从session中移除