Deployment of Eclipse project to Tomcat plug-in

Source: Internet
Author: User

When using eclipse to develop a web project, I use the Tomcat plug-in. This is the case when deploying a web project:

On the project, right-click-> properties-> tomcat-> and check the is a tomcat project to write the context name and web application root.

Note the following two points:

1. The context name is the name after http: // localhost: 8080. Remember to add/

2. Web application root is in the same directory as SRC, which contains the name of the folder for WEB-INF and META-INF, eclipse default is webroot.

 

However, when I started Tomcat and started running the project following this deployment, http: // localhost: 8080 showed the cat, and no exception was reported during startup, however, when accessing the project, the system reports a 404 error (generally the path is incorrect due to the 404 error). No project-compiled XML file exists in conf-> Catalina-> localhost of Tomcat, I can't explain it. It's exactly like this ..

 

After several hours of exploration, the solution is as follows:

Right-click the project-> properties-> JAVA build path-> source. Here is a default Output Folder, which should be set:

Project name/Web application root/WEB-INF/classes

Only in this way can the Eclipse project be successfully deployed on Tomcat.

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.