备忘Listener

来源:互联网 发布:搜狗关键词优化哪家好 编辑:程序博客网 时间:2024/05/18 02:31

写个Listener很简单,为了备忘,写上

 

步骤一:

Class  implements ServletContextListener

实现里面的方法,在contextInitialized里面写要加载的方法

 

步骤二:

在web.xml加上插件,如下:

    <listener>
        <listener-class>
            com.comtop.dqmp.statistics.runner.StatisticalListener
        </listener-class>
    </listener>