启动tomcat时报如下异常:
Caused by: java.lang.IllegalArgumentException: The main resource set specified [C:MyAppapache-tomcat-9.0.29wtpwebappsjerryjsp] is not validat org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:752)at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:709)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)... 30 more
![bd32cf01b755d8620090725a2febd130.png](https://i-blog.csdnimg.cn/blog_migrate/8967b872ece2f5dc02ec62dc34cdac29.jpeg)
查看Servers文件夹下面的server.xml:
C:甥敳獲i042416eclipse-workspaceServersTomcat v9.0 Server at localhost-configserver.xml
![900ebf1fafb945db15578908ad139f77.png](https://i-blog.csdnimg.cn/blog_migrate/9e5cca3bb6708b179c6a08ad7c983f2f.jpeg)
发现里面指向了一个无效的jsp应用:
![06026c6399c5e3ad8896f8addab6383f.png](https://i-blog.csdnimg.cn/blog_migrate/44f944d3f7d685c43330f2e8f0c9a383.jpeg)
手动删除server.xml文件里的Context节点,问题解决。服务器又可以启动了:
![2ec15f3cffcd6ee3b0cd2063a06f12a5.png](https://i-blog.csdnimg.cn/blog_migrate/12a408870fa9e12c9a301733cc0aa137.jpeg)
![daeaacf1bc5239acee727d20f0690cad.png](https://i-blog.csdnimg.cn/blog_migrate/fde538688d1371ebedfc28e46ab40e4e.jpeg)
把jsp应用的war包放到tomcat文件夹下的webapps里,会自动解压进行部署:
Jul 20, 2020 10:57:21 AM org.apache.catalina.startup.HostConfig deployWARINFO: Deploying web application archive [C:MyAppapache-tomcat-9.0.29webappsjerryjsp.war]Jul 20, 2020 10:57:22 AM org.apache.jasper.servlet.TldScanner scanJarsINFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.Jul 20, 2020 10:57:22 AM org.apache.catalina.startup.HostConfig deployWARINFO: Deployment of web application archive [C:MyAppapache-tomcat-9.0.29webappsjerryjsp.war] has finished in [1,579] ms
[图片]
![4f5300afd00b3ef686ea99792f848baf.png](https://i-blog.csdnimg.cn/blog_migrate/9ef5f61fd6d6aaf53ee080a894bd3f5d.jpeg)
![0bba99d2aba78c0417c830a77d2f1ca7.png](https://i-blog.csdnimg.cn/blog_migrate/a40b356447419585503e9e7667898244.jpeg)
![452f6bef93c78758c4df200189a55325.png](https://i-blog.csdnimg.cn/blog_migrate/aea18772bb85a10ae0236f68d4b5cc74.jpeg)