title: How to use Tomcat 7 new aliases properly?
body: <p>Tomcat 7 provide new aliases that allow to store static content outside the WAR File. 
  I found some instructions how to do that in <a href="http://www.developer.com/java/web/article.php/3904871/Top-7-Features-in-Tomcat-7-The-New-and-the-Improved.htm" rel="nofollow">http://www.developer.com/java/web/article.php/3904871/Top-7-Features-in-Tomcat-7-The-New-and-the-Improved.htm</a> part 4.</p>
  
  <p>But it does not work for me. </p>
  
  <p>I have two context XML files. One for my application (admin.xml) and one for my static resources (uploads.xml).</p>
  
  <p>I did everything like mentioned in this tutorial but Tomcat does not see any static resources outside WAR file.</p>
  
  <p>My static resources structure:</p>
  
  <pre><code>/home/user/admin-images/-
                     -234bF5_image/image.jpg
                     -572d44_otherImage/otherImage.jpg
                     -12A4uR_otherImage/otherImage.jpg
  </code></pre>
  
  <p>admin.xml:</p>
  
  <pre><code>&lt;Context path="/admin" 
          docBase="path/to/application/target" reloadable="false"&gt;
      &lt;WatchedResource&gt;WEB-INF/web.xml&lt;/WatchedResource&gt;
      &lt;Manager pathname="admin" /&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>uploads.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context path="/admin" aliases="/images=/home/user/admin-images"&gt;
  
  &lt;/Context&gt;
  </code></pre>
  
  <p>After context deploy images not reachable:</p>
  
  <pre><code>http://localhost:8080/admin/images/234bF5_image/image.jpg
  </code></pre>
  
  <p>when I try to reach this I get error that image can not be displayed.</p>