tomcat报"The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not permitted"
2013-08-06 10:20
966 查看
原因总结:
1、在web.xml中或者用annotation配置了同一个url-pattern映射, 属于重复配置;
2、做项目的过程中遇到这种情况,最开始使用annotation配置servlet,后来因为还要加一些其他配置就统一改到web.xml中去配置servlet了。用maven命令打包后部署,总是报如上的错误,查了很久终于发现在webapp/WEB-INF/classes目录下有一些旧的*.class文件(肯定是这些文件里包含之前的annotation),把这些*.class删掉,重新打包部署,这下一切ok了。
1、在web.xml中或者用annotation配置了同一个url-pattern映射, 属于重复配置;
2、做项目的过程中遇到这种情况,最开始使用annotation配置servlet,后来因为还要加一些其他配置就统一改到web.xml中去配置servlet了。用maven命令打包后部署,总是报如上的错误,查了很久终于发现在webapp/WEB-INF/classes目录下有一些旧的*.class文件(肯定是这些文件里包含之前的annotation),把这些*.class删掉,重新打包部署,这下一切ok了。
相关文章推荐
- The servlets named [A] and [B] are both mapped to the url-pattern [/servlet/]which is not permitted
- The servlets named [x] and [y] are both mapped to the url-pattern [/JServlet] which is not permitted
- The servlets named [X] and [Y] are both mapped to the url-pattern [/Z] which is not permitted
- J2EE的TOMCAT服务器报The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not per
- The servlets .. are both mapped to the url-pattern [/ControllerServlet] which is not permitted
- The servlets named [UserExit] and [com.fxh.control.UserExit] are both mapped to the url-pattern [/Us
- The servlets named [LoginCheckServlet] and [LoginCheckServlet] are both mapped to the url-pattern [/
- The servlets named [xxx] and [com.web.xxx] are both mapped to the url-pattern
- maven创建Web项目启动错误The servlets named [X] and [Y] are both mapped to the url-pattern [/DemoServlet]
- Caused by: java.lang.IllegalArgumentException: The servlets the url-pattern which is not permitted
- The servlets named [LogRecord] and [com.action.service.imp.LogServiceImp] are both mapped to the url
- The source files "*\A.cpp " and "*\A.cpp " are both configured to produce the output file "*\A.obj "
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- INS-35354] The system on which you are attempting to install Oracle RAC is not part of a valid clust
- How to find the exact line position which causes “undefined is not a function" error
- The application **** has attempted to open a connection to a location inside the firewall and outside the firewall which is not
- SQLBackupAndFTP The server principal "NT AUTHORITY\SYSTEM" is not able to access the database "xxxx"
- Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.
- SharePoint 2013 搜索报错"Unable to retrieve topology component health. This may be because the admin component is not up and running"