tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Path parameters and getRequestURI
Date Fri, 10 Feb 2012 15:45:59 GMT
Hash: SHA1


On 2/8/12 4:34 PM, Mark Thomas wrote:
> On 08/02/2012 21:25, Christopher Schultz wrote: Unfortunately, the
> servlet spec is far from clear on how path parameters should be
> handled. I hope to get clarity in 3.1 with [1]

In fact, it might actually contradict itself. Section 3.5 of spec
version 3.0 has this to say about request URI, servlet context, and
servlet path:

It is important to note that, except for URL encoding differences
between the request URI and the path parts, the following equation is
always true:

  requestURI = contextPath + servletPath + pathInfo

I'm fairly sure that "encoding differences" do not include missing (or
present) path parameters -- I assume they mean URL encoding.

In Appendix 8, one of the changes since 2.3 was "Clarification of
handling of path parameters for the mapping (11.1)". That section now
seems to be 12.1 in the 3.0 spec (as you have referred in your
previous post).

12.1 says that the path matched against <url-patterns> in web.xml
comes from the request URL "minus the context path and path
parameters", so that's pretty clear. Nothing else is really clear
other than that invariant equation which is at least suspicious.

Tomcat no longer follows the invariant equation shown above. I hope
the expert group weighs-in on this sooner rather than later.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


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

View raw message