tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: Question about context aliases
Date Fri, 23 Apr 2010 09:51:38 GMT
On 22.04.2010 18:51, Mark Thomas wrote:
> On 22/04/2010 17:40, Rainer Jung wrote:
>> Experimenting on the extreme side of things: when trying to use
>> aliases="/=/some/path" I can't get any resource to load:
>> - there is /some/path/
>> - servletContext().getResourceAsStream("/") returns null.
>> It works, once I use aliases="/myapp=/some/path" and
>> servletContext().getResourceAsStream("/myapp/").
>> Is that expected?
> Nope. Thats broken.

I see, it was because you need to remove the trailing slash and for "/" 
the trailing slash is the leading one too.

Now using an alias with "/" naively seems to make not much sense (the 
webapps will break unless you move everything there). I thought about 
using slash in order to overwrite stuff. So the expected behaviour for 
an alias using "/" would be to only use the alias results, if something 
was actually found under the alias.

I prepared a patch for that:

What do you think?



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

View raw message