Tomcat boots up normally, 404. Eclipse does not deploy the project correctly

Source: Internet
Author: User
Tags tomcat server

http://blog.csdn.net/lynn_wgr/article/details/7751228

Create a new dynamic Web Project in Eclipse. After writing the code, select Run on server (of course server is configured as Tomcat), but after the run we send 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 wait for Tomcat in eclipse to start later. Enter http://localhost:8080/webDemo/login.jsp (where Webdemo is the project name) in the eclipse's built-in browser. can open normally. But we did not have the desired kitten screen when we opened http://localhost:8080 on the external browser. In other words, Toncat does not start properly. (often we are in the Bin directory after clicking Startup.bat.) You can see the desired kitten in the input http://localhost:8080.)


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

2: Delete items in run on server before

3: Select the Tomcat server below servers. Right click and select Open, the following prompt appears:
Modify the server Locations (the default is the first one selected.) If there is no 1, 2-step operation. This option is grayed out and cannot be edited)
Select the second item (Use Tomcat installation (takes ...)
4: Change the following deploy path to WebApps, the default is Wptwebapps, the above server path corresponds to the Tomcat installation directory on the computer
5: Save Settings. Exit
6: Click Web Project, run as--and run on Server--.....
Then. The project is automatically deployed under Tomcat's WebApps. After startup, you can browse normally.

Note that there is a change to the Server.xml file in the tomcat--conf directory (eclipse automatically modifies it. Note the modified content <context ......>

Tomcat boots up normally, 404. Eclipse does not deploy the project correctly

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.