Symptoms:
Tomcat can start normally in eclipse, and access to http://localhost:8080/in the browser is not accessible and is reported as 404 error. Other project pages cannot be accessed at the same time.
Close the tomcat inside Eclipse, double-click Startup.bat in the Tomcat installation directory to manually start the Tomcat server. Access htt://localhost:8080/can access the Tomcat administration page normally.
Symptom causes:
Eclipse redirects the Tomcat Project publishing directory (WebApp in the Tomcat directory), so you will find that your project file cannot be found in the WebApp directory under the Tomcat installation directory.
Workaround:
Reconfigure the following Tomcat server:
On the server page in Eclipse, double-click the Tomcat service to see the configuration page:
You can see that the red circle is selected with the Use workspace metadata (does not modify Tomcat installion).
However, it is sometimes found that the options in the red circle are grayed out and cannot be modified because the project is deployed in the Tomcat, and it is necessary to remove the deployed items from Tomcat first.
By right-clicking the Tomcat server, select Add and remove to remove the deployed project in the popup dialog box. :
When you are finished removing the OK, you will see the Options Panel section above editable. (note that Tomcat must be in a running state to be able to edit)
1. Select the Use Tomcat installation (Task control of Tomcat installation) to select Tomcat's installation directory as the publishing directory for the project.
2. Did you see "Deploy Path"? The value behind it defaults to "Wtpwebapps", which is changed to "WebApps", which is the name of the folder where the project was published in Tomcat .
3. After the modification, turn off the page and save the configuration. This deploys the project to the WebApp in the Tomcat installation directory
4. Restart the Tomcat server, access to http://localhost:8080 is normal access, your own deployment of the project will be able to access the normal.
Tomcat started successfully in Eclipse and the homepage was not opened