Create a web application in eclipse and Intellij IDEA and integrate tomcat for deployment. After starting tomcat, it is found that the web application can be accessed normally, but
http://localhost:8080
reports 404.
Confirm the current status:
- tomcat starts normally without error
- Port 8080 is not occupied
- The web application can be accessed normally without error
Reason: Starting tomcat in the IDE is not to start the tomcat in the actual directory of the system, the container exists in the IDE. When configuring the deployment mode, you need to configure replication and use the conf configuration in the tomcat path (the conf configuration in the tomcat path points to the webapps directory of tomcat, 8080 accesses the ROOT application by default, if the ROOT application directory is not found, it will report 404 )
Solution: Check whether the steps to deploy the project are complete, when specifying tomcat
Go to the following page
Be sure to specify the running directory of tomcat, pay attention to the last red box selected
Click apply and ok