运维网's Archiver
论坛
›
Tomcat
› tomcat启动加载
hb_sz
发表于 2017-1-17 07:19:43
tomcat启动加载
web开发中,为了让tomcat启动时之心自定义功能,可以在web.xml中添加以下内容
<listener>
<listener-class>com.***.***ContextListener</listener-class>
</listener>
在***ContextListener类中实现ServletContextListener接口,实现contextInitialized方法,在该方法中写入希望执行的功能。
页:
[1]
查看完整版本:
tomcat启动加载