When tomcat is started in eclipse, Error 404 occurs

Source: Internet
Author: User


Http://blog.csdn.net/wqjsir/article/details/7169838

Symptoms:

Tomcat can be started normally in eclipse, but http: // localhost: 8080/cannot be accessed in the browser, and Error 404 is reported. Other project pages cannot be accessed.

Close tomcat in eclipse and double-click startup. bat under the tomcat installation directory to manually start the tomcat server. Access htt: // localhost: 8080/to access the tomcat Management page.

Symptom cause:

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 and you will see the configuration page:

You can see that the Use workspace metadata (does not modify Tomcat installion) is selected in the red circle)

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

Right-click the tomcat server and choose Add and Remove. In the displayed dialog box, Remove the deployed project. After you have removed the settings, you can see that the options panel is editable.

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

Then, in the next four lines, do you see "Deploy Path? The default value is "wtpwebapps". Change it to "webapps", that is, tomcat.

The name of the folder where the publish project is located. After modification, close the page and save the configuration. In this way, the project is deployed to the webapp under the tomcat installation directory.

Restart the tomcat server and access http: // localhost: 8080, And the deployed project can be accessed normally.

Related Article

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.