几种常用的listenner

1.ServletContextListener:监控web容器的启动和关闭

2.HttpSessionListener:监控bs结构中b的session创建和session销毁

3.HttpSessionBindingListener:控制bs结构中b的session中值得添加和remove.(接口中共定义了两个方法:valueBound()和valueUnbound())

4.ContextLoaderListener: 实现(继承)这个抽象类,可以指定加载那个.xml文件形成Application.xml对于的东东.一般用于把ApplicationContext保存起来,以便在web环境中使用Application,避免重复加载applicationContext.xml,很耗资源.(见孙经理写的MyContextLoaderListener----给ContextUtil,setAc(ac)).

posted @ 2014-04-26 23:21  NewObject_1  阅读(746)  评论(0编辑  收藏  举报