http://localhost:8080/error 404 after Tomcat starts normal

Source: Internet
Author: User
Tags tomcat server

Symptom:

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 selection in the red circle is the use workspace metadata (does not modify Tomcat installion) If the project is deployed in the Tomcat, the options in the red circle will be dimmed and cannot be modified. To modify, you must first remove the deployed services from Tomcat

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" and changes it to "WebApps", which is the name of the folder where the project is published in Tomcat. 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.

Transferred from http://blog.csdn.net/wqjsir/article/details/7169838/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.