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