jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [servlet-spec users] Re: [73-getMapping] PROPOSAL

From: Mark Thomas <markt_at_apache.org>
Date: Fri, 17 Feb 2017 22:02:13 +0000

On 17/02/17 20:32, Edward Burns wrote:
>>>>>> On Fri, 17 Feb 2017 14:47:55 +0000, Mark Thomas <markt_at_apache.org> 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.
>
> MT> Arjan can comment better than I how significant this is. My default
> MT> position is to support whichever Arjan prefers.
>
> I would like to argue for the full string that matches the pattern.
>
> EB> ACTION: Please review the API at [1] and comment by close of business
> EB> GMT-0800 Tuesday 21 February.
>
> MT> On my TODO list.
>
> Thank you. You might want to skip right to the table in
>
> 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
>
> Sorry for the truncated lines in my last email. I can resend it if you
> like.

No problem. I have the JAR file so I can compare APIs.

The only difference I have found is that Tomcat's implementation has an
an explicit MappingMatch.UNKNOWN whereas the spec version doesn't.

I think there is merit is using an explicit value for UNKNOWN. I think
it makes the code using it easier to read.

Mark