users@jersey.java.net

Re: [Jersey] How to add ContainerRequestFilter's when deplyed in HTTPServer (and not as Servlet)

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 04 Aug 2009 10:21:36 +0200

On Aug 3, 2009, at 7:51 PM, Morten wrote:

> Hi,
>
> How do I add ContainerRequestFilter's such as PostReplaceFilter to
> jersey when running simply under sun's HTTPServer and not in a full
> J2EE sevlet context ?
>

You can add filters to the ResourceConfig using the property
ResourceConfig. PROPERTY_CONTAINER_REQUEST_FILTERS, see:

https://jersey.dev.java.net/nonav/apidocs/1.1.1-ea/jersey/com/sun/jersey/api/core/ResourceConfig.html
#PROPERTY_CONTAINER_REQUEST_FILTERS

Paul.