我使用Tomcat 7作为vaadin项目的Web服务器// Eclipse作为编辑器.. 它曾经工作正常,但昨天当我试图运行服务器时,我收到了这个错误 .. 我试图删除服务器并创建一个新的..但它没有工作
Caused by: java.lang.IllegalArgumentException: The servlets named [com.example.teamonelibraryapp_.Teamonelibraryapp_UI$Servlet] and [ui.AppMain$Servlet] are both mapped to the url-pattern [/*] 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.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:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
答案 0 :(得分:1)
该追踪中最重要的部分似乎是
The servlets named [com.example.teamonelibraryapp_.Teamonelibraryapp_UI$Servlet] and
[ui.AppMain$Servlet] are both mapped to the url-pattern [/*] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
所以最有可能的是,将这些servlet映射到不同的url将解决您的问题。