Modify access paths for Web projects in Eclipse (Java EE edition)

Source: Internet
Author: User

Access path, that is, the root path when accessing the Web system in a browser, such as http://localhost:8080/xxxx/index.jsp here xxxx.

That is, the value obtained by Request.getcontextpath ().

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.

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.

But in the Eclipse EE local development slightly different, we open severs configuration, can see the following

We can see that there are 3 options in the server locations, 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 configuration file under that path, or click on the modules below to modify the path of each project in the Web modules.

Modify access paths for Web projects in Eclipse (Java EE edition)

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.