> From: JanAa [mailto:jan.aage...@norse-solutions.com] 
> Subject: RE: Multiple context paths for single deployment

> What I want is an alias for the context so that more than 
> one url can be used for the same application and that the
> url used is reflected in HttpServletRequest.getContextPath().

I just realized that Tomcat 7 does have an alias capability that might be 
configured for what you want, but I haven't tried it.  Here's some of the 
description from:

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Standard_Implementation


aliases 

This attribute provides a list of external locations from which to load 
resources for this context. The list of aliases should be of the form 
"/aliasPath1=docBase1,/aliasPath2=docBase2" where aliasPathN must include a 
leading '/' and docBaseN must be an absolute path to either a .war file or a 
directory.

A resource will be searched for in the first docBaseN for which aliasPathN is a 
leading path segment of the resource. If there is no such alias, then the 
resource will be searched in the usual way.


If you set each /aliasPath to the same .war file or directory, this may achieve 
your goal.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to