title: How to set the context path of a web application in Tomcat 7.0
body: <p>I know that I can rename my webapp (or it's WAR file) to <strong>ROOT</strong> but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc &amp; it says </p>
  
  <blockquote>
    <p>It is NOT recommended to place  elements directly in the
    server.xml file</p>
  </blockquote>
  
  <p>So I tried doing it another method that it suggested.</p>
  
  <blockquote>
    <p>Individual Context elements may be explicitly defined: In an
    individual file at /META-INF/context.xml inside the application files.</p>
  </blockquote>
  
  <p>So I created a <code>/META-INF/context.xml</code> with the following code,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context antiJARLocking="true" path="/"/&gt;
  </code></pre>
  
  <p>But after deploying when I restarted the server it still failed to load the context at "/", it still loaded it with the <code>"/&lt;WEB_APP_NAME&gt;"</code></p>
  
  <p>Any pointers helpful.</p>