users@servlet-spec.java.net

[servlet-spec users] Re: Implementation of new Servlet functionality?

From: Greg Wilkins <gregw_at_webtide.com>
Date: Thu, 7 Apr 2016 09:27:22 +1000

On 7 April 2016 at 09:20, Stuart Douglas <stuart.w.douglas_at_gmail.com> wrote:

> I was just thinking about this a bit more and it might be useful to
> include the target Servlet name in the mapping result, so a filter could
> tell exactly what Servlet the request is targeted at (we could even take it
> one step further and include a list of the filter names that will process
> the request, although I don't know what the use case would be).
>


So for clarity, I'm when we have a mapping like:

<servlet>
  <servlet-name>home</servlet-name>
  <jsp-file>/jsp/Home.jsp</jsp-file></servlet><servlet-mapping>
  <servlet-name>home</servlet-name>
  <url-pattern>/home</url-pattern></servlet-mapping>

The mapping reported will be the /home mapping rather than any *.jsp
implicit pattern.

You are suggesting that we add getServletName to the Mapping, which in this
case would return "home" I see value in that.

There may even be value in a getDescriptor() method that would give a text
description of what descriptor the mapping was from: web.xml, fragment
web.xml from a particular jar, annotation on a particular class etc.







-- 
Greg Wilkins <gregw@webtide.com> CTO http://webtide.com