tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Hut" <>
Subject Resources / docBase question
Date Sat, 02 Feb 2008 10:42:34 GMT

Hi all,

I'm wondering how to point Tomcat to an expanded webapp location whose
resources are served from a different location.

It's easy to point Tomcat to external resources by providing a
deployment descriptor; for example, if I have the following in

<Context docBase="c:/images" />

Then requests for: localhost:8080/imageApp/foo.jpg will serve the file
from c:/images/foo.jpg

But, I want to add servlet filtering to the webapp with the class files
in my expanded application hierarchy (containing a WEB-INF/classes and
web.xml file):

<Context docBase="c:/source/imageApp" />

Now localhost:8080/images/foo.jpg will 404 (requested resource not
available) because the file isn't in the source/imageApp hierarchy -
makes sense so far.

I thought that configuring a <Resources> element for the <Context>,
redefining the docBase to my external directory, might do the trick:

<Context docBase="c:/source/imageApp">
docBase="c:/images" />

But image requests are still resulting in a 404 not found.

Is there a way (other than using symlinks) to run code from an expanded
webapp hierarchy docBase but serve static content from an external

Thanks much!

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message