title: Difference between Tomcat's extraResourcePaths and aliases to access an external directory
body: <p>Simple question: In Tomcat7, what's the difference between using extraResourcePaths and aliases to access an directory outside the application?</p>
  
  <p>I can use either of these two server.xml snippets and they both seem to work.  Both seem to load this URL successfully: <code>http://localhost/app/images/box.jpg</code>.  Is there an advantage to using one over the other?</p>
  
  <pre><code>&lt;Context docBase="Eclipse_Project" path="/app"
          reloadable="true" source="org.eclipse.jst.j2ee.server:Eclipse_Project"
          aliases="/images=D:\path\to\images"/&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;Context docBase="Eclipse_Project" path="/app"
          reloadable="true" source="org.eclipse.jst.j2ee.server:Eclipse_Project"&gt;
          &lt;Resources className="org.apache.naming.resources.VirtualDirContext"
                  extraResourcePaths="/images=D:\path\to\images"/&gt;
  &lt;/Context&gt;
  </code></pre>