當我嘗試啓動服務器時出現上述錯誤。重要的注意事項,對於任何其他Web Apps服務器啓動就好了。這只是這個特定的Web應用程序不起作用。下面是完整的堆棧跟蹤:java.lang.IllegalArgumentException:servlet都映射到不允許的url-pattern [/ foo]
Caused by: java.lang.IllegalArgumentException: The servlets named [DOMServlet] and [edu.unsw.comp9321.DOMServlet] are both mapped to the url-pattern [/DOMServlet] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2428)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2103)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2064)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2057)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1304)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
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:5412)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
「名爲[DOMServlet]和[edu.unsw.comp9321.DOMServlet該小服務程序都映射到URL圖案而這是不允許[/ DOMServlet]」。你還需要什麼? – Marvin
謝謝,這個修好了!對不起,應該更詳細地閱讀跟蹤! – Larry