Trying to implement basic auth, but ContainerRequestFilters never gets
invoked. I also had a typo in the package name of my @Provider, but the
.war deployed successfully with nothing in the logs. There should have
been a ClassNotFoundException.
Why isn't Jersey loading my @Provider and calling filter()?
Here's from my web.xml:
<servlet>
<servlet-name>RestServlet</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.corp.mtp.rest.security;com.corp.mtp.rest.autocomplete.controller;org.codehaus.jackson.jaxrs</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>jersey.config.disableMoxyJson.server</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.corp.mtp.rest.autocomplete.controller.JerseyMultipartSetup</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
<param-value>com.corp.mtp.rest.security.BasicAuthFilter</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
I'm using jersey-server-2.5.1 with media-multipart on Tomcat 6.