IDE starts tomcat access and reports HTTP 404 error

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:
  1. tomcat starts normally without error
  2. Port 8080 is not occupied
  3. 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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326137008&siteId=291194637