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)