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
${CATALINA_BASE}/conf/Catalina/localhost/imageApp.xml:

<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">
        <Resources
className="org.apache.naming.resources.FileDirContext"
docBase="c:/images" />
</Context>

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
location?

Thanks much!
Chris

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to