在运行tomcat是总会发生细节和让自己一看就一头雾水的问题:比如
Starting Tomcat v7.0 Server at localhost' has encountered a problem.
Starting Tomcat v7.0 Server at localhost' has failed to start
出现此窗体时,先稳住,仔细看看错误类型,
1、可能是class 类
2、可能是@WebServlet("路径")的冲突
3、当然还有一写什么jar包的缺失,
下列代码就是我的路径错误
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ShopWeb2]]
at java.util.concurrent.FutureTask.report(Unknown Source)at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1239)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/ShopWeb2]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [com.lovo.myweb.servlet.DeleteShop] and [com.lovo.myweb.servlet.UpdateShop] are both mapped to the url-pattern [/Update] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2457)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2132)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2085)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1302)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:887)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5527)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
The servlets named [com.lovo.myweb.servlet.DeleteShop] and [com.lovo.myweb.servlet.UpdateShop] are both mapped to the url-pattern [/Update] which is not permitted
为啥要报错啊!因为细心是很重要啊!