Caused by: java.lang.IllegalArgumentException: The servlets named [JavaQuestionForm] and [JavaQuestion] are both mapped to the url-pattern [/JavaQuestion] which is not permitted
at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:293)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2443)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2118)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:2041)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1948)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1311)
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:5479)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
问问题
570 次
2 回答
2
正如异常所说,您正在尝试将 2 个不同的 servlet 绑定到同一个 URI:
The servlets named [JavaQuestionForm] and [JavaQuestion] are both mapped to the url-pattern [/JavaQuestion] which is not permitted
你必须改变你的web.xml
于 2016-01-26T07:06:28.940 回答
0
检查您的web.xml
或网络配置注释。显然您将两个不同的 servlet (JavaQuestion
和JavaQuestionForm
) 映射到同一个 URL: /JavaQuestion
。
于 2016-01-26T07:05:05.930 回答