title: Tomcat6 ignores META-INF/context.xml
body: <p>Tomcat6 keeps ignoring my META-INF/context.xml.  I keep getting "Name tt is not bound in this Context" when I try to look up "tt" (please see 'details').</p>
  
  <p>When I put the content of META-INF/context.xml inside the 'context' tag in server.xml, it works.  I've also checked that <strong>$Tomcat-base/Catalina/localhost is empty</strong>, so my META-INF/context.xml is not overridden.</p>
  
  <hr>
  
  <p>details:</p>
  
  <p>Tomcat version: 6.0.10</p>
  
  <p>Here's my Webroot structure:</p>
  
  <p>Webroot<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-META-INF<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-context.xml<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-WEB-INF<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|-web.xml</p>
  
  <p>Content of context.xml:</p>
  
  <pre><code>&lt;Context&gt;
      &lt;Environment name="tt" value="this is a string" type="java.lang.String"&gt;&lt;/Environment&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>Context tag of this webroot in server.xml:</p>
  
  <pre><code>&lt;Context path="/test" docBase="E:\javaProjects\TestProject\Webroot" reloadable="true"&gt;&lt;/Context&gt;
  </code></pre>
  
  <p>The way I look up for "tt":</p>
  
  <pre><code>...
  Context ic = new InitialContext();
  Context ec = (Context) ic.lookup("java:comp/env");
  String str = (String) ec.lookup("tt");
  System.out.println("str is "+str);
  </code></pre>
  
  <p>The error I get:</p>
  
  <pre><code>javax.naming.NameNotFoundException: Name tt is not bound in this context
  </code></pre>