目录

java.lang.IllegalStateException-启动子级时出错

目录

java.lang.IllegalStateException: 启动子级时出错

IDEA/Myeclipse/eclipse运行项目时出现:

java.lang.IllegalStateException: 启动子级时出错

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)

https://i-blog.csdnimg.cn/blog_migrate/712af027d8478885b53bb6534dd950d7.png

找到项目的web.xml 。在web.xml文件中,Servlet测试代码前加注释:@WebServlet("/test")

HttpPutFormContentFilter

/

DruidWebStatFilter

com.alibaba.druid.support.http.WebStatFilter

exclusions

.js, .gif, .jpg, .png, .css, .ico,/druid/

DruidWebStatFilter

/

index.jsp

/.jsp

true

https://i-blog.csdnimg.cn/blog_migrate/0f5f1aa9af47a1b0991489679ba987b6.png

Servlet的url-partten加上"/":

https://i-blog.csdnimg.cn/blog_migrate/c73c131dd0adafb65dd285c650e38ebc.png

即可解决问题。