十分不解,启动tomcat后实现了ServletContextListener的类的contextInitialized()方法执行了2次
我定义了一个类实现了ServletContextListener接口,然后在contextInitialized()方法中打印一句话,这句话居然打印了2次,每次启动都打印...
我定义了一个类 实现了ServletContextListener接口,然后在contextInitialized()方法中打印一句话,这句话居然打印了2次,每次启动都打印2次。下面是控制台消息
信息: Starting Servlet Engine: Apache Tomcat/6.0.26
xxxxxxxxxxxxxxxx
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
信息: Deploying configuration descriptor manager.xml
信息: Deploying web application directory docs
信息: Deploying web application directory examples
信息: ContextListener: contextInitialized()
2012-5-17 18:38:44 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ccc0.1
xxxxxxxxxxxxxxxx
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT 展开
信息: Starting Servlet Engine: Apache Tomcat/6.0.26
xxxxxxxxxxxxxxxx
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor host-manager.xml
信息: Deploying configuration descriptor manager.xml
信息: Deploying web application directory docs
信息: Deploying web application directory examples
信息: ContextListener: contextInitialized()
2012-5-17 18:38:44 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ccc0.1
xxxxxxxxxxxxxxxx
2012-5-17 18:38:44 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询