jsr369-experts@servlet-spec.java.net

[jsr369-experts] Re: [73-getMapping] PROPOSAL

From: Mark Thomas <markt_at_apache.org>
Date: Wed, 8 Feb 2017 23:39:12 +0000

On 08/02/17 23:00, Edward Burns wrote:
> EB> I addressed the Filter and Listener issue as follows:
>
> EB> HttpServletRequest.getMapping():
>
> EB> If called from a Servlet, return the Mapping by which this
> EB> HttpServletRequest was invoked, otherwise return a Mapping equivalent
> EB> to the one specified for the default implementation. Each invocation
> EB> of this method must return a fresh instance of Mapping. The
> EB> implementation must retain no reference to the returned
> EB> Mapping. Servlet 4.0 compliant implementations must override this
> EB> method.
>
>>>>>> On Wed, 8 Feb 2017 22:40:02 +0000, Mark Thomas <markt_at_apache.org> said:
>
> MT> Changing the behaviour based on which code is making the call will break
> MT> the intended use cases.
>
> MT> Every request is mapped to a servlet. getMapping() should return the
> MT> current servlet mapping regardless of where the call originates from.
>
> I can certainly do it that way. Do we need to make it more clear by
> changing the name of the method to be getServletMapping()?

That makes sense to me. Mapping -> ServletMapping as well? That leaves
the possibility of FilterMapping in the future should it ever be requested.

Mark