Caused by: java.lang.IllegalArgumentException: The servlets the url-pattern which is not permitted
2016-08-26 00:00
861 查看
Caused by: java.lang.IllegalArgumentException: The servlets named [ServletDemo] and [day05.ServletDemo] are both mapped to the url-pattern [/ServletDemo] which is not permitted
应该是 /ServletDemo 一个请求映射了 [ServletDemo] and [day05.ServletDemo] 两个servlet
找到原因了
是因为在类定义上面:
@WebServlet("/ServletDemo")//这里
public class ServletDemo extends HttpServlet {
不需要再在web.xml中定义servlet属性了。
应该是 /ServletDemo 一个请求映射了 [ServletDemo] and [day05.ServletDemo] 两个servlet
找到原因了
是因为在类定义上面:
@WebServlet("/ServletDemo")//这里
public class ServletDemo extends HttpServlet {
不需要再在web.xml中定义servlet属性了。
相关文章推荐
- The servlets named [A] and [B] are both mapped to the url-pattern [/servlet/]which is not permitted
- java.lang.IllegalArgumentException: Window type can not be changed after the window is added.
- The servlets named [X] and [Y] are both mapped to the url-pattern [/Z] which is not permitted
- Caused by: java.lang.IllegalArgumentException: prefix wsdp is not bound to a namespace
- The servlets .. are both mapped to the url-pattern [/ControllerServlet] which is not permitted
- android之“java.lang.IllegalArgumentException: Window type can not be changed after the window is add”
- android之“java.lang.IllegalArgumentException: Window type can not be changed after the window is add”
- Caused by: java.lang.IllegalArgumentException: The handle attribute is must refer to an existing chi
- The servlets named [x] and [y] are both mapped to the url-pattern [/JServlet] which is not permitted
- BottomSheetBehavior 之 java.lang.IllegalArgumentException: The view is not associated with BottomSheetBehavior
- java.lang.IllegalArgumentException: The class class ** is not found in EntityFactory.
- Caused by: java.lang.IllegalArgumentException: addChild: Child name 'localhost' is not unique
- java.lang.IllegalArgumentException: Window type can not be changed after the window is added.
- Android Caused by: java.lang.IllegalArgumentException: column '_id' does not exist
- Tomcat的异常 之 java.lang.IllegalArgumentException: Document base *** does not exist or is not a readable
- android java.lang.IllegalArgumentException: The observer is null.异常解决【转】
- HIbernate 3.2 java.lang.IllegalArgumentException: object is not an instance of declaring class
- android java.lang.IllegalArgumentException: The observer is null.异常解决
- Caused by: java.lang.IllegalArgumentException: Original must not be null
- Caused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add