Web projects in eclipse are automatically deployed to Tomcat

Source: Internet
Author: User

Eclipse for a long time, and recently because it is also used to do a simple JSP project, but also to re-learn, although familiar with the very fast, but always very vague memories, occasionally made mistakes, rarely wrote a blog, now feel is still very necessary, programming everyone for the mistakes made, after the solution is no longer used, Reuse for a long time, or make the same mistake. (This is the people, the programming environment, the way of thinking together decided to give)

Problem

Here's a question of how to automate the deployment of site projects in Eclipse to Tomcat. Web projects made in eclipse by default do not support publishing items to a Web server, publish to a directory in the workspace, and therefore cannot launch Tomcat externally to run Web projects, only the server in Eclipse is open to run the Web project. So to make changes to eclipse, you can publish a good project to the Tomcat server and publish it to the WebApps folder on the server.

In eclipse, the default is to put the Web project under Eclipse's workspace. Metadata\.plugins \org.eclipse.wst.server.core\tmp0 (or TMP1) \wtpwebapps\, If you now have an Access project in eclipse that you deployed to the server in the previous way, you will see your project in the top directory:

Workaround

1. In the bottom-most servers view of Eclipse, remove all deployed projects:

2. On the server, right-click to select "Open", or press F3 shortcut in the blank, or double-click to open the following page:

3. At "Server Locations", select "Use Tomcat Installation", you can see clearly that the default is "used Workspace metadata", that is, the above-mentioned directory. Then write the WebApps on the path of the deploy, as shown in:

After the modification is complete, save it. Later projects will be published under Tomcat under the WebApps.

Note: 1. In Eclipse, publishing a Web project in this way will divide the Conf folder of the original server into a backup folder and create a new folder of its own to serve as a Web project for configuring Eclipse Publishing. So you still want to write a Java Web project using MyEclipse

2. Sometimes, under the server locations project, nothing is optional, you can delete the server, re-add the Tomcat server, then right-click Open, Modify.


Web projects in eclipse are automatically deployed to Tomcat

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.