tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Path parameters and getRequestURI
Date Fri, 10 Feb 2012 15:45:59 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

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.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk81O7cACgkQ9CaO5/Lv0PDI1ACdHU6pGVHrEI/dbUV0PeNNawTT
TloAoKGiPK9NbmzUQTn5JBgmLziSxPNY
=Nw5J
-----END PGP SIGNATURE-----

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


Mime
View raw message