java.lang.IllegalStateException: ContainerBase.addChild: start
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]
Tomcat部署Servlet时出错
caused by:
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> servlet/TestServlet1 in servlet mapping
其实是:
@WebServlet(name="TestServlet1",urlPatterns={"servlet/TestServlet1"})
中的urlPatterns中的路径少些了个"/"
正确的如下:
@WebServlet(name="TestServlet1",urlPatterns={"/servlet/TestServlet1"})
本文出自 “IT菜鸟” 博客,请务必保留此出处http://mazongfei.blog.51cto.com/3174958/1894322
文章来自:http://mazongfei.blog.51cto.com/3174958/1894322