-
Feature Request
-
Resolution: Won't Do
-
Major
-
Wanted But Unscheduled
-
None
We should realize JAX-RS 1.1 is implemented as Java Servlet and its configuration + JAX-RS application wiring is made above Java Servlet 3.0 Specification in EAP6/AS7.
Our JAX-RS implementation - RESTEasy - must follow every possibility specified by previous mentioned standards.
From Java Servlet specification version 2.5 is possible to have multiple URL in one servlet mapping like (way 1):
<servlet-mapping> <servlet-name>MappedServlet</servlet-name> <url-pattern>/mapping1/*</url-pattern> <url-pattern>/mapping2/*</url-pattern> </servlet-mapping>
for details see SRV.19.0.3 Multiple Occurrences of Servlet Mappings inside Java Servlet standard.
It is also possible to have multiple servlet mapping specification to one servlet like (way 2):
<servlet-mapping> <servlet-name>MappedServlet</servlet-name> <url-pattern>/mapping1/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>MappedServlet</servlet-name> <url-pattern>/mapping2/*</url-pattern> </servlet-mapping>
This option has come from first Java Servlet specification.
In RESTEasy no one above way works! It seems like only first mapping occurence is recognized (either way 1 or way 2) and every other is silently ignored -> a such resources are unavailable and HTTP Code 404 is occurred when somebody tries access them.
This is very bad approach - it is unable to do (only) some part of JAX-RS application/resources available only after proper authentication - this is only the first example/scenario I can imagine, I'm sure there are existing others useful cases for to do it in this way too.