users@jersey.java.net

[Jersey] Is ContainerRequestFilters needed in web.xml?

From: Dean Schulze <dean.w.schulze_at_gmail.com>
Date: Tue, 25 Feb 2014 11:43:51 -0700

I'm trying to track down why my @Provider filter() method isn't being
invoked. I've got a bare bones REST web service with basic auth security
that works. I've noticed that if I give the wrong package name in the
<param-value> for ContainerRequestFilters that my security still works. I
then commented out the entire <init-param> element
with ContainerRequestFilters and redeployed (cleaned out all old
directories and archives too).

My security still works! What gives?

In this simple case my @Provider is in the same package as my RESTful web
service class. Maybe this has something to do with it.

I'm running on Tomcat 6 with jersey-server-2.5.1.