tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <>
Subject Re: AJP Todo
Date Mon, 10 Dec 2001 10:20:45 GMT
> >
> > If the web app is deployed as a directory, you can call
> > context.getDocBase() for this.  If the context is deployed as a WAR
> > there is no such thing as the "document base as an absolute path".  In
> > such a scenario, you need to choose one of the following options:
> Unfortunately, if the context is declared in server.xml, getDocBase
> the docBase declared in server.xml (e.g. "examples" in the shipping
> server.xml).  I can't see how to turn this into an absolute path.
> >
> > * Forward *all* requests to Tomcat for processing
> This is my preference.  The problem is determining if it is deployed as a
> WAR file or not given the context.  This one is probably just my stupidity
> however :).

You should be able to use Context.getResource and then use instanceof to see
if it's a FileDirContext, a WARDirContext or something else altogether (in
which case, you should do the same as if it was a WAR, I think).

> > * Reject a webapp that is deployed this way

Please don't do that :)


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message