users@servlet-spec.java.net

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

From: Edward Burns <edward.burns_at_oracle.com>
Date: Fri, 11 Sep 2015 09:35:32 -0700

https://java.net/jira/browse/SERVLET_SPEC-73

>>>>> On Thu, 10 Sep 2015 13:18:32 +0100, Mark Thomas <markt_at_apache.org> said:

MT> Much clearer. Many thanks. +1 from me.

Aside from the below mentioned changes to the sketch provided by Arjan,
I have a question. Does it make sense to allow the caller to discover
if the mapping was invoked via a Servlet vs. a Filter? If so, how about
adding a method to Mapping boolean isServlet()?

The proposal is at
<https://maven.java.net/service/local/repositories/snapshots/archive/javax/servlet/javax.servlet-api/4.0.0-b01-SERVLET_SPEC-73-SNAPSHOT/javax.servlet-api-4.0.0-b01-SERVLET_SPEC-73-20150911.162919-1-javadoc.jar/!/javax/servlet/http/HttpServletRequest.html>.

 
SECTION: Modified Files
 
A src/main/java/javax/servlet/http/Mapping.java

- The new type.
M src/main/java/javax/servlet/http/HttpServletRequest.java
A src/main/java/javax/servlet/http/MappingMatch.java

- Renamed this from Arjan's MappingType. The fact that it's an enum
  says that it's a type already.

- Added spec language.

- Added UNKNOWN and IMPLICIT MappingType values.

- Dropped isImplicit in favor of enum value.

Please review.

Thanks,

Ed
  
-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| 39 Business days til JavaOne 2015
| 54 Business days til DOAG 2015