tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: repost: contextPath + servletPath + pathInfo = requestURI?
Date Sat, 13 Nov 1999 02:16:10 GMT
James Todd wrote:
> when i read, and re-read, the spec i'm not so sure a "/*" mapping is
> a violation. the fact that it begins with a "/" and ends with "/*" and
> the is one and only one slash in the string (ie it intersects the sets)
> does not, in my humble interpretation, violate the spec measurably.
> i believe i added a bit'o code to support both "/" and "/*" (should
> be in RequestMapper) and at the time didn't have a real heart-ache
> in doing so.
> interestingly enough when i first joined a team i had a bit of a problem
> supporting both "" and "/" requests. this was before the 2.2 pattern
> matching stuff but as such i still suspect the "/" pattern match. of the
> three:
>     ""
>     "/"
>     "/*"
> i like the latter especially when coupled with the "will match the longest
> request" spec statement.

Well, preferences aside, to override the default pattern you must use the
"/" pattern; that's what's in the spec. I agree that it's hard to say if "/*" is 
a valid pattern or not. My take on it is that it isn't valid, because there's
only one slash and I'm not sure how it could mean anything else than the
default servlet, and the mapping for the default servlet it well defined
as just "/".

Anyway, the behavior Geoff described indicates that there's a problem with
the setting of contextPath, servletPath and pathInfo in Tomcat for the
default servlet mapping, regardless of if "/*" is valid or not.

Hans Bergsten
Gefion Software

View raw message