tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remy Maucherat" <r...@apache.org>
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
file,
> > 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
returns
> 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 :)

Remy


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message