Tomcat starts normally, but when the project is accessed, 404. Eclipse does not deploy the project properly

Source: Internet
Author: User
Tags tomcat server
New dynamic Web Project in Eclipse. After writing the code, select Run on server (of course, Server is configured as Tomcat), but after running, we send out the name of the project we created under the Tomcat installation directory. Obviously, the project is not automatically deployed to Tomcat's WebApps.
Don't believe us. After Tomcat in eclipse starts. Enter http://localhost:8080/webDemo/login.jsp (where Webdemo is the engineering name) in the eclipse's built-in browser. can be opened normally. But when we open the http://localhost:8080 on the external browser, we do not appear the desired kitten screen. In other words, Toncat does not start properly. (often we are in the Bin directory after clicking Startup.bat.) The desired kitten can be seen in the input http://localhost:8080)


In order for our project to be automatically deployed to the WebApps directory like Myelipse (you can use Plug-ins, but the eclipse plugin doesn't seem to work, I don't like it anyway). We need to make some simple changes to the Tomcat server we built.
1: Stop the Tomcat server within Eclipse. Stop

2: Delete the project in the run on server before

3: Select Tomcat server under Servers. Right-click and select Open, the following prompts:
Modify server locations (default is the first selection.) If you do not perform a 1, 2-step operation. This option is dimmed and cannot be edited)
Select the second item (Use Tomcat installation (takes ...)
4: Change the following deploy path to WebApps, by default Wptwebapps, above the server path corresponding to the Tomcat installation directory on the computer
5: Save settings. Exit
6: Click Web Project, run as--> run on Server--.....
at this point. The project is automatically deployed under Tomcat's WebApps. You can browse normally after startup.

Note that the Server.xml file is changed in the tomcat--conf directory at this time (Eclipse is automatically modified.) Note that the modified content <context ...

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.