Symptoms:
Tomcat can start normally in eclipse, and access to http://localhost:8080/in the browser is not accessible and is reported as 404 errors. Other project pages are not accessible at the same time.
Close Tomcat inside Eclipse and double-click Startup.bat under the Tomcat installation directory to manually start the Tomcat server. Access to htt://localhost:8080/can normally access the Tomcat administration page.
Symptom Reason:
Eclipse redirects the Tomcat's Project publishing directory (WebApp in the Tomcat directory), so you will find that your project files are not found in the WebApp directory under the Tomcat installation directory.
Solution:
To reconfigure the Tomcat server:
On the server page in Eclipse, double-click the Tomcat service to see the configuration page as shown in the figure:
You can see that the use workspace metadata is selected in the red circle (does not modify Tomcat installion)
If the project is deployed in Tomcat, the options in the red circle will be dimmed and cannot be modified, and you must first remove the deployed services from Tomcat.
As shown in figure:
Remove the deployed item in the pop-up dialog box by right-clicking the Tomcat server to select Add and remove. When you have removed the confirmation, you will see that the options panel above is editable.
Select Use Tomcat installation (Task control of Tomcat installation) to select the Tomcat installation directory as the publication directory for the project.
And then, down four lines, see "Deploy Path"? The value behind it defaults to "Wtpwebapps", which is changed to "WebApps", which is Tomcat.
The name of the folder where the project is published.
Turn off the page after the modification and save the configuration. This deploys the project to the WebApp under the Tomcat installation directory
Restart the Tomcat server, access to the http://localhost:8080 can be normal access, your deployment of the project can also be normal access.