Start the tomcat browser in eclipse cannot access

symptom:

Tomcat can be started normally in eclipse, but http://localhost:8080/ cannot be accessed in the browser , and a 404 error is reported. At the same time, other project pages cannot be accessed.

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

Causes of symptoms:

       eclipse redirects the tomcat project release 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.

Solution:

Reconfigure the tomcat server:

On the server page in eclipse, double-click the tomcat service, you will see the configuration page as shown:

   

You can see that the choice in the red circle is Use workspace metadata (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 all deployed services in tomcat.

As shown:

By right-clicking the tomcat server and selecting Add and Remove, the deployed project is removed in the pop-up dialog box. After removing and confirming, you will see that the above option panel is editable.

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

Then, down four lines, do you see "Deploy Path"? The default value behind it is "wtpwebapps", change it to "webapps", which is  tomcat

The name of the folder where the project is published in.
After modification, close this page and save the configuration. This will deploy the project to the webapp in the tomcat installation directory

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

Tomcat can be started normally in eclipse, but http://localhost:8080/ cannot be accessed in the browser , and a 404 error is reported. At the same time, other project pages cannot be accessed.

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

Causes of symptoms:

       eclipse redirects the tomcat project release 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.

Solution:

Reconfigure the tomcat server:

On the server page in eclipse, double-click the tomcat service, you will see the configuration page as shown:

   

You can see that the choice in the red circle is Use workspace metadata (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 all deployed services in tomcat.

As shown:

By right-clicking the tomcat server and selecting Add and Remove, the deployed project is removed in the pop-up dialog box. After removing and confirming, you will see that the above option panel is editable.

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

Then, down four lines, do you see "Deploy Path"? The default value behind it is "wtpwebapps", change it to "webapps", which is  tomcat

The name of the folder where the project is published in.
After modification, close this page and save the configuration. This will deploy the project to the webapp in the tomcat installation directory

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

Guess you like

Origin blog.csdn.net/kerwinJu/article/details/78508684