Modify Web Project Access path in eclipse

Source: Internet
Author: User
Background

The access path, that is, the root path when accessing the Web system in a browser, such as http://localhost:8080/xxxx/index.jsp, where xxxx, or Request.getcontextpath (), gets the value.

When we do system development, in the local workspace may have multiple versions of the same system, such as the above-mentioned XXXX system, there may be xxxx1, Xxxx1_1, xxxx1_2 represents the system of 1.0, 1.1, 1.2 version, The corresponding project name is the system access path by default, however, we may want these projects to have a unified access path XXXX, so when deployed to the server, regardless of which project is deployed, access path is unified.

Method

In the server deployment, such as Tomcat, we only need to modify the corresponding context.xml file, <context path= "" > property corresponding to the access path.

In Eclipse, double-click the Tomcat instance of the server view, as follows

We can see that there are 3 options in the server locations, in which the first option is selected, which is managed by Eclipse's configuration of Tomcat, and the corresponding virtual configuration directory is in the server path column in the picture.

We can go directly to modify the Conf/server.xml file under that path, or click on the modules below to modify the path of each project in the Web modules inside. The effect is ultimately to modify the path content of the context in the Server.xml file.

Modify Web Project Access path in eclipse

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.