On 1.8.2011 19:28, charlesk wrote:
> Thanks Jakub. I'll try that.
>
> Another question that may be related. I would also like to configure Jersey
> filters (that implements ContainerRequestFilter). Is there any specific
> ResourceConfig implementation class that I should be using for configuring
> filters?
You can use the same class (PackagesResourceConfig). You only need to use
the constructor taking a property bag [2].
> For an example, I have something like this (In servlet web.xml). I like to
> configure this in ResourceConfig so that I can inject using @Context
> ResourceConfig _context in my Jersey filter.
Do you mean Servlet filter? Jersey's ServletContainer could also be used
as a Servlet filter
and could be configured in a similar way as if it was used as a Servlet
(via parameters).
You can also extend from it. To get inspired, you may want to look at
[3] (see [4] for the source code).