我已經在eclipse Luna上安裝了tomcat服務器來處理我的動態web項目。服務器似乎運行良好時,我不加載任何項目文件,但當我加載我的項目時,它給出了錯誤「本地主機服務器Tomcat v7.0服務器無法啓動。」我檢查了我的項目,似乎沒有錯誤。這些是我得到的服務器啓動消息:java.lang.IllegalArgumentException:無效<url-pattern> servlet映射中的WelcomeServlet
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> WelcomeServlet in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3325)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3300)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1438)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1357)
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:5419)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
顯示你的'WelcomeServlet'的代碼:'產生的原因:java.lang.IllegalArgumentException異常:無效 WelcomeServlet在servlet映射' –
JohnnyAW
如果您不使用註釋,請添加您的web.xml servlet配置。 –