title: Changing Tomcat context path of web project in Eclipse
body: <p>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 <a href="http://localhost:8080/app" rel="noreferrer">http://localhost:8080/app</a> instead of <a href="http://localhost:8080/foobar" rel="noreferrer">http://localhost:8080/foobar</a>.  I've tried everything that I can think of:</p>
  
  <ul>
  <li>Updated the server.xml path value in the Context section </li>
  </ul>
  
  <p>From</p>
  
  <pre><code>&lt;Context docBase="foobar" path="/foobar" reloadable="true" source="org.eclipse.jst.j2ee.server:foobar"/&gt;&lt;/Host&gt;
  </code></pre>
  
  <p>To</p>
  
  <pre><code>&lt;Context docBase="foobar" path="/app" reloadable="true" source="org.eclipse.jst.j2ee.server:foobar"/&gt;&lt;/Host&gt;
  </code></pre>
  
  <ul>
  <li><p>I updated the file conf/Catalina/localhost/foobar.xml to set the path="/app" and docBase="foobar" with no luck.  </p></li>
  <li><p>I tried to remove the Module in Eclipse and redeploy at least a dozen times.</p></li>
  <li><p>I went through the suggestions here: <a href="https://stackoverflow.com/questions/2437465/java-how-to-change-context-root-of-a-dynamic-web-project-in-eclipse">How to change context root of a dynamic web project in Eclipse?</a></p></li>
  </ul>
  
  <p>I know that I can simply rename the project, but I don't want to.</p>
  
  <p><img src="https://i.stack.imgur.com/OIBkk.png" alt="Here are my Server settings within Eclipse."></p>
  
  <p>EDIT:</p>
  
  <p>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.</p>