users@jersey.java.net

Filters <was> Re: [Jersey] Using Annotations, how to set up filters for auth, version check, etc

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 01 Mar 2010 14:26:44 +0100

Hi Kevin,

Pavel recent made modifications to Jersey in the trunk so you can add
filters to the ResourceConfig. Should be available in the 1.2-SNAPSHOT.

Thus if you do something like:

   public class MyApp extends DefaultResourceConfig {
   }

and then see:

https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/core/ResourceConfig.html
#getContainerResponseFilters%28%29

Paul.

On Feb 22, 2010, at 9:11 PM, Kevin Duffey wrote:

> Hello fellow Jersey friends,
>
> I've been using Jersey with GF3 the past several weeks and am loving
> the annotations work. I am missing however how to set up filters. I
> defined the Auth filter and a version check filter in the web.xml
> before. But now that I don't need to use web.xml to set up the
> jersey servlet, I am curious how we indicate request and/or response
> filters, and how to indicate the order for which they should be
> processed?
>
> Thank you.
>
>