Eclipse configuration tomcat under mac cannot start the problem

Summary: Symptom: tomcat can be started normally in eclipse, but cannot be accessed in the browser when http://localhost:8080/ is accessed, and a 404 error is reported. At the same time, other project pages cannot be accessed. Close tomcat in eclipse, and double-click startup.bat in the tomcat installation directory to manually start the tomcat server.

Symptoms:

Right-click open

tomcat can start normally in eclipse, but can not access http://localhost:8080/ in the browser, and report a 404 error. At the same time, other project pages cannot be accessed.

Close tomcat in eclipse, and double-click startup.bat in the tomcat installation directory to manually start the tomcat server. Visit htt://localhost:8080/ to access the tomcat management page normally.

Cause of symptoms:

   Eclipse redirects the project release directory of tomcat (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.
Solution:

Reconfigure the tomcat server:

On the server page in eclipse, double-click the tomcat service, and you will see the configuration page as shown:
_You
can see that Use workspace metadata is selected in the red circle (does not modify Tomcat installion )

If the project is deployed in the tomcat, the options in the red circle will be grayed out and cannot be modified. To modify, you must first remove the deployed services in the tomcat.

As shown in the figure:
_
Remove the deployed project in the pop-up dialog by right-clicking the tomcat server and selecting Add and Remove. After the removal is confirmed, you will see that the options panel section above is editable.

Select Use tomcat installation (Task control of Tomcat installation), that is, select the installation directory of tomcat as the release directory of the project.

Then, go down four lines and see "Deploy Path"? The default value behind it is "wtpwebapps", change it to "webapps", which is
the name of the folder where the project is published in tomcat.
After modification, close this page and save the configuration. In this way, the project is deployed to the webapp in the tomcat installation directory,

restart the tomcat server, and access http://localhost:8080 can be accessed normally, and the projects deployed by yourself can also be accessed normally.

Guess you like

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