tomcat7内嵌式老提示找不到web.xml

amani_2022 2016-10-25 11:43:26
各位大神··使用TOMCAT7的embed老出现这个错误是什么情况呢
omcat = new Tomcat();
tomcat.setPort(port);
tomcat.setBaseDir(".");
StandardServer server = (StandardServer) tomcat.getServer();
AprLifecycleListener listener = new AprLifecycleListener();
server.addLifecycleListener(listener);
try {
tomcat.addWebapp(contextPath, baseDir);
tomcat.start();
} catch (ServletException e) {
e.printStackTrace();
} catch (LifecycleException e) {
e.printStackTrace();
}



十月 25, 2016 11:40:55 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
十月 25, 2016 11:40:55 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
十月 25, 2016 11:40:55 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Tomcat
十月 25, 2016 11:40:55 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.72
十月 25, 2016 11:40:55 上午 org.apache.catalina.startup.ContextConfig getDefaultWebXmlFragment
信息: No global web.xml found
十月 25, 2016 11:40:57 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
十月 25, 2016 11:40:57 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [218] milliseconds.
十月 25, 2016 11:40:57 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
...全文
499 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

62,628

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧