Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Is there such thing as an "alias" context?

Daniel Gibby

2004-01-27

Replies:

I don't see why you would ever want to do this... and there is no such
feature.

It seems that your idea of forwarding everything over would be easier to
maintain and create than you think.

Glanville, Jay wrote:

>Hello all.
>
>Is there such a thing as an alias context, where all requests for a
>specific context get redirected to a second context?
>
>The way that we are currently doing this is to set the docBase attribute
>of the "alias" context to the docBase of the "concrete". For example:
>   <Context path="/concrete" docBase="/app/webroot" />
>   <Context path="/alias"   docBase="/app/webroot" />
>
>I don't like this approach as if we move the docBase of the concrete
>context, we need to update the docBase of the alias context. I would
>prefer to see something like this:
>   <Context path="/concrete" docBase="/app/webroot" />
>   <Context path="/concrete" alias="/concrete"    />
>
>I also know that this could be done using an actual web application with
>a single servlet that redirects all requests to the other context.
>However, that requires creation and maintenance. If this could be done
>with a configuration setting that would be good.
>
>I haven't been able to find anything about redirects or aliases in the
>tomcat 5 documentation. Is there such a feature?
>
>Thanks
>
>JDG
>
>
>--
>Jay Glanville
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
>For additional commands, e-mail: tomcat-user-help@(protected)
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.