1.监听器的分类:
1.监听器对象自身的创建和销毁的事件监听器有三个:
1.httpServletRequest(ServletRequestListener);
2.httpSession(httpSessiontListener);
3.ServletContext(servletContextListener);
他们是什么域对象就怎么样去试用他。
2.监听域对象属性中的增强和删除的事件监听器也有三个:
1.httpServletRequest(ServletRequestAttributeListener);
2.httpSession(httpSessiontAttributeListener);
直接添加一个进session里,测试下下就行。
3.ServletContext(servletContextAttributeListener);
3.监听绑定到httpservlet域中的某个对象的状态的事件监听器他不许需要web.xml配置:
1.httpSessionBindingListener
可直接调用。
2.httpSessionActivationListener