java.lang.IllegalArgumentException:名为[foo]和[bar]的servlet都映射到不允许的url-pattern [/ url]

时间:2016-01-26 07:01:17

标签: tomcat servlets illegalargumentexception url-pattern servlet-mapping

gmdate('W')

2 个答案:

答案 0 :(得分:2)

正如异常所说,您正在尝试将2个不同的servlet绑定到同一个URI:

The servlets named [JavaQuestionForm] and [JavaQuestion] are both mapped to the url-pattern [/JavaQuestion] which is not permitted

您必须更改web.xml

答案 1 :(得分:0)

检查您的web.xml或网络配置注释。显然,您将两个不同的servlet(JavaQuestionJavaQuestionForm)映射到同一个网址:/JavaQuestion