The servlets named [X] and [Y] are both mapped to the url-pattern [/Z] which is not permitted
2017-01-04 17:24
726 查看
当我用myeclipse新建了一个servlet之后,重新运行tomcat,出现了如下错误
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/task02_2]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
.........
观察错误原因,发现是存在相同的映射,但是web.xml文件里只有一个映射。网上查了之后发现原来是新建servlet时myeclipse在对应的servlet里加了@WebServlet("/UserServlet")注解 这样就不用在web.xml里配置servlet的映射路径了,否则就会出现以上错误。
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/task02_2]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
.........
观察错误原因,发现是存在相同的映射,但是web.xml文件里只有一个映射。网上查了之后发现原来是新建servlet时myeclipse在对应的servlet里加了@WebServlet("/UserServlet")注解 这样就不用在web.xml里配置servlet的映射路径了,否则就会出现以上错误。
相关文章推荐
- The servlets named [x] and [y] are both mapped to the url-pattern [/JServlet] which is not permitted
- The servlets named [A] and [B] are both mapped to the url-pattern [/servlet/]which is not permitted
- J2EE的TOMCAT服务器报The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not per
- tomcat报"The servlets named [x] and [y] are both mapped to the url-pattern[z] which is not permitted"
- The servlets .. are both mapped to the url-pattern [/ControllerServlet] which is not permitted
- The servlets named [LoginCheckServlet] and [LoginCheckServlet] are both mapped to the url-pattern [/
- maven创建Web项目启动错误The servlets named [X] and [Y] are both mapped to the url-pattern [/DemoServlet]
- The servlets named [xxx] and [com.web.xxx] are both mapped to the url-pattern
- The servlets named [UserExit] and [com.fxh.control.UserExit] are both mapped to the url-pattern [/Us
- The servlets named [LogRecord] and [com.action.service.imp.LogServiceImp] are both mapped to the url
- Caused by: java.lang.IllegalArgumentException: The servlets the url-pattern which is not permitted
- The application **** has attempted to open a connection to a location inside the firewall and outside the firewall which is not
- INS-35354] The system on which you are attempting to install Oracle RAC is not part of a valid clust
- 使用FABridge时,出现You are trying to call recursively into the Flash Player which is not allowed…错误的处理
- 启动程序时报的错,The servlets .. are both mapped to the url-pattern [/IndexServlet] which is not permitted
- 访问嵌入式网页出错:The requested URL '/' resolves to a file which is marked executable but is not a CGI file
- Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.
- 访问嵌入式网页出错:The requested URL '/' resolves to a file which is marked executable but is not a CGI file
- Saving changes is not permitted. The changes that you have made require the following tables to be d
- Internet Information Services is not installed. You must have Internet Information Services installed in order to use the SharePoint Products and Technologies Configuration Wizard