我已经在我的 PC 上安装了 Tomcat 服务器。
我在 Eclipse 中创建了一组 servlet,并以 WAR 格式导出
当我部署到服务器并让它启动时,我收到以下错误:
FALLO - No se pudo arrancar la aplicación en trayectoria de contexto /Middleware
FALLO - Encontrada excepción org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Middleware]]
如果我转到 Tomcat 日志文件以获取更多详细信息,请参阅以下内容:
Caused by: java.lang.IllegalArgumentException: The servlets named [reunionServlet] and [servlet.ReunionServlet] are both mapped to the url-pattern [/ReunionServlet] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:335)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2457)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2139)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2100)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2093)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1300)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5269)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
问题是什么?
不知道问题是否出在文件 web.xml 上。其内容如下