I'm using Tomcat 6 and using the Servers functionality in Eclipse to manage it. I have a project named foobar and I'd like to change the context path so that the URLs referenced are http://localhost:8080/app instead of http://localhost:8080/foobar. I've tried everything that I can think of:
- Updated the server.xml path value in the Context section
From
<Context docBase="foobar" path="/foobar" reloadable="true" source="org.eclipse.jst.j2ee.server:foobar"/></Host>
To
<Context docBase="foobar" path="/app" reloadable="true" source="org.eclipse.jst.j2ee.server:foobar"/></Host>
I updated the file conf/Catalina/localhost/foobar.xml to set the path="/app" and docBase="foobar" with no luck.
I tried to remove the Module in Eclipse and redeploy at least a dozen times.
I went through the suggestions here: How to change context root of a dynamic web project in Eclipse?
I know that I can simply rename the project, but I don't want to.
EDIT:
I also should mention that I have some db settings in the application context. I am unsure if this should be set to foobar.xml or app.xml..? Eclipse automatically creates an app.xml file in conf/Catalina/localhost, but it seems to be ignored after I make changes.