Thanks for replying.

I was under the impression that the difference between
HttpServletRequest.getContextPath and ServletContext.getContextPath() was
exactly that the first returned the context path used in the request while
the second returned the context path used when processing
(http://download.oracle.com/javaee/5/api/javax/servlet/ServletContext.html#getContextPath()).

I realise I have to find another route, I still need multiple urls to one
application, and I have to identify these in the code. I am thinking about
an urlrewritefilter that sets a request-attribute, and then use an
outbound-rule to not show this to the users. Any other/better proposal?

-Jan 


n828cl wrote:
> 
>> 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(). 
> 
> Those are conflicting requirements.  Pick one or the other - you can't
> have both.
> 
> (Actually, you can, but it would be a major pain.  If you wrote a filter
> that wrapped every HttpServletRequest object and implemented your own
> getContextPath() method, you could choose to return whatever you want for
> the result.)
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-context-paths-for-single-deployment-tp31601866p31611838.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to