Tomcat startup failure solution (idea)
Check jdk version
Check the project structure in the upper right corner of idea, click Project, modify Project SDK and Project Language level, I use java 1.8
Check module
1. Check if the Web exists
If it is a jsp project, to be packaged into war, you need to check whether the following content exists
If there is no Web under the module, you need to add it
Or you can add it in Facets
2. Check whether the Artifacts are Exploded
If not, you need to click Add
Check Tomcat configuration
If Tomcat is not configured, click on the upper left corner to add
Tomcat Home Select the installation path of Tomcat and it will be automatically recognized
View configuration information
Ports can be configured by yourself
Click Deployment to see if there is a war exploded
If it does not exist, click on the right to add it.
After completion, you can modify the virtual path yourself
Check dependencies
If Tomcat already exists in the project, but there are still no Servlet-related dependencies, you can check whether the dependencies exist in External Libraries.
If it is not in JDK and Tomcat, consider re-creating the project and configuring Tomcat