title: How to specify path in META-INF/context.xml for Tomcat
body: <p>I'm using Tomcat 7 and would like to set the context root of a war file in the war file itself and have Tomcat autodeploy and pick up this path.
     I thought I found the way to do it by putting a context.xml in the META-INF directory of the war which contains.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context path="/somepath/myapp"/&gt;
  </code></pre>
  
  <p>But this doesn't seem to work, I think it's loaded by <a href="http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/SetContextPropertiesRule.html">http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/startup/SetContextPropertiesRule.html</a> which states it loads everything but the path!</p>
  
  <p>I know I can name the war somepath#myapp.war and it will pick it up but I also deploy to weblogic which isn't happy with a name like this.</p>
  
  <p>Is there some setting I can use to have the path work from the context.xml above?</p>
  
  <p>Thanks
  David</p>