You can specify the context path of the Web application for Tomcat through the file context.xml
.
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/otro_nombre"/>
However,
eclipse ignores this file and considers the value configured in the project properties. See "Properties for project_name" > "Web Project Settings" > "Context root".
Before Tomcat deploys,
eclipse edits the file server.xml
located in, for example, /Servers/Tomcat v7.0 Server at localhost-config/
and add a line similar to:
<Context docBase="nombre_del_proyecto"
path="/otro_nombre"
reloadable="true"
source="org.eclipse.jst.jee.server:nombre_del_proyecto"/>
Once all the files are ready, they are copied to the corresponding folder in the workspace, e.g. workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
.