Eclipse deployment Tomcat modifies project Access path (virtual path)

Source: Internet
Author: User

Original reference: Http://www.educity.cn/wenda/147993.html

http://blog.163.com/java_zf/blog/static/19926038420129240314546/

Tomcat Deployment Web project (Eclipse Auto-Deploy project to Tomcat, access URL does not contain deployment name)

recent projects need to deploy the project to Tomcat, and the access path does not include the unsigned, and want to implement the automatic deployment of eclipse, grilled a long time data, finally realized their own needs, hehe, as follows:

1. Set the project context root to/:
Right-click the project to make the following changes


2. In Eclipse, remove the project under the server first, then right-click the server to select Clear up, and then double-tap the server to modify the deployment path (modifying the deployment path must be the only way you can find your own deployment path)


3. In the Tomcat installation directory, there is a conf folder, open this folder, which contains the configuration file Server.xml, open the configuration file, and insert the following statement between

<context path= "/hello" docbase= "F:\eclipse3.2\workspace\hello\WebRoot" debug= "0" privileged= "true" $AMP;     >amp; $nbsp; </Context>

Modify the Server.xml to suit your needs


Web project with Tomcat published in Eclipse, changing its deployment path

My Eclipse working directory:

D:\eclipse\workspace

When you are finished configuring Tomcat in Eclipse, the path that you publish to is:

D:\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps

This path is too deep, so I want to use the default path of Tomcat, how do I make changes in eclipse?

1. Locate the server panel and right-click on the current Tomcat and remove all of the works first.

2. Then right-click the Tomcat, select Clean, and clear.

3. Double-clicking the Tomcat will open the properties panel and find the second server Locations on the left.

Selecting the second will create a new Wtpwebapps file under the Tomcat path to hold the Tomcat published Web project;

Select the third one, you can enter the path you want in the server path, save it.


Eclipse deployment Tomcat modifies project Access path (virtual path)

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.