我已在我的电脑上安装了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有关。它的内容如下:
@WebServlet("someUrl")
? - Luiggi Mendoza