问题描述:Tomcat容器和Eclipse启动运行时候报错
Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/***]]
错误原因:
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> FindServlet in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3429)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3404)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1438)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1359)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:888)
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:5522)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
是因为在部署描述符(web.xml)中配置的<url-pattern>出现问题,可能是格式不对,该格式必须符合url模式,比如要在前面加上/ 表示相对路径。
解决办法:修改成正确的url模式。