|<< Back to previous view|
[JERSEY-1798] JerseyServletContainerInitializer behavior violates JAX-RS 1.1 Spec Created: 17/Mar/13 Updated: 06/Nov/13 Resolved: 06/Nov/13
|Remaining Estimate:||0 minutes|
|Time Spent:||6 hours, 5 minutes|
|Original Estimate:||18 hours|
Windows, Java 1.7.0_07-b11, WebLogic 22.214.171.124, Jersey 1.17 as preferred application library
|Participants:||chasetec and Libor Kramolis|
Given this example:
My resources should only be available at /v1/. What happens is they are available at two paths /v1/ and /resources/*. With the above example I see the following in the log:
Mar 16, 2013 10:19:22 PM com.sun.jersey.server.impl.container.servlet.JerseyServletContainerInitializer addServletWithApplication
To prevent the auto registration of a servlet with a url-pattern of /resources/* I have to use a servlet-name that matches the fully-qualified class name of the application subclass like so:
On page 6 of the spec it says: If an Application subclass is present and there is already a servlet defined that has a servlet initialization parameter named javax.ws.rs.Application whose value is the fully qualified name of the Application subclass then no new servlet should be added by the JAX-RS implementation's ContainerInitializer since the application is already being handled by an existing servlet.
It says nothing about the servlet-name also having to match the class name to prevent adding a new servlet. The servlet-name is the class name when a servlet is added by a JAX-RS implementation (as stated in the next paragraph of the spec) but that is separate from how to prevent the addition of the servlet.
|Comment by Libor Kramolis [ 04/Nov/13 10:44 AM ]|
Have you tried WebLogic 12.1.2 or newer? I guess it is already fixed there.
|Comment by Libor Kramolis [ 06/Nov/13 06:12 PM ]|
This is already fixed in WebLogic 12.1.2 or newer.