Elipse Project deployed under Tomcat

Source: Internet
Author: User
Tags java web tomcat tomcat server

Remember when you started learning Java Web, the first thing you did was eclipse development, but there was one problem that never figured out how a good Web project would be published on a tomcat server. Finally, it comes to the conclusion that eclipse, the software, may be publishing the project to a temporary directory, and the server can be launched to run the Web project only when Eclipse is opened. It is for this reason that the myeclipse has been used to develop Java Web projects (very convenient and handy). These days with a lot more, so again on the issue of interest, can not be good Java Web project published to the Tomcat server WebApps, can not start eclipse, directly on the external boot server access to their own projects. The answer is yes.

Unlike MyEclipse, Web projects made in Eclipse do not support publishing items to a Web server by default, they are published to a directory in the workspace, so Tomcat cannot be launched externally to run Web projects, only the servers in eclipse are opened. 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, as shown in the figure:

In order to put a good Java Web project into the WebApps of Tomcat, you need to follow these steps to make the changes:

1. In the bottom servers view of Eclipse, remove all deployed projects, as shown in the figure:

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

3, select "Use Tomcat Installation" at "Server Locations", 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 the following figure:

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

Note: In Eclipse, publishing a Web project in this way will divide the original server's Conf folder 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.

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.