jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: Heads up: your action requested Re: [servlet-spec users] Re: [73-getMapping] PROPOSAL

From: Edward Burns <edward.burns_at_oracle.com>
Date: Tue, 21 Feb 2017 06:46:40 -0800

>>>>> On Tue, 21 Feb 2017 10:48:23 +0100, arjan tijms <arjan.tijms_at_gmail.com> said:

AT> Calling with http://localhost:8080/servlet4/bla.ext

AT> Prints:

AT> Mapping match:EXTENSION
AT> Match value:/bla

EB> In my implementation in GlassFish I have this returning /bla.ext.

AT> Pattern:*.ext

MT> My understanding was that the 'Match value' was meant to be what the '*'
MT> was matched with.

AT> Calling with http://localhost:8080/servlet4/path/bla

AT> Prints:

AT> Mapping match:PATH
AT> Match value:/bla

EB> GlassFish: /path/bla

AT> Pattern:/path/*

MT> Same as previous point.

AT> I'd much prefer the Tomcat interpretation of the match value. With that the
AT> unique match is far easier to distinguish as it's indeed what the '*' was
AT> matched with.

AT> Match value and Pattern can be relatively easy combined if needed. The
AT> subtraction of the pattern from the match is a far less easy operation.

Ok. So for clarity, let's take a look at the table I added to [1],
rendered here in text form.

URI Path (in quotes) matchValue pattern mappingMatch
"" / / CONTEXT_ROOT
"/MyServlet" /MyServlet /MyServlet EXACT
"/foo.extension" /foo.extension /*.extension EXTENSION
"/path/foo" /path/foo /path/* PATH

The above is incorrect according to the desires of Arjan and Mark. I
have revised the table according to my understanding of the requested
change. ACTION: Please check this!

URI Path (in quotes) matchValue pattern mappingMatch
"" "" / CONTEXT_ROOT
"/MyServlet" MyServlet /MyServlet EXACT
"/foo.extension" foo /*.extension EXTENSION
"/path/foo" foo /path/* PATH

If there are any other illustrative rows anyone would like to see in
this table, please add them in reply to this email.

Please let me know by COB GMT-0800 Wednesday as I would like to lock
this down and move on.

Thanks,

Ed

-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| 10 business days until planned start of JSF 2.3 Final Approval Ballot
|  0 business days until DevNexus 2017
| 25 business days until JavaLand 2017
[1] https://maven.java.net/service/local/repositories/snapshots/archive/javax/servlet/javax.servlet-api/4.0.0-b03-SERVLET_SPEC-73-SNAPSHOT/javax.servlet-api-4.0.0-b03-SERVLET_SPEC-73-20170216.222658-3-javadoc.jar/!/javax/servlet/http/ServletMapping.html