users@jersey.java.net

Resource Filter/Interception/Handler

From: Andrew Ochsner <aochsner_at_cs.stanford.edu>
Date: Tue, 28 Oct 2008 15:12:35 -0600

Hi:

I need to grab some information out of the Http Headers before every call to
a resource. I take it the best way to do this is to use a Servlet Filter?

Is there any other way to do this in Jersey? What if I wanted to some
JSR311 @Context information in this thing? Are there any hooks in Jersey to
configure a handler to execute before (and maybe after) every call to a
resource and have Jersey inject it's JSR311 specific annotated stuff?

I guess I'm kinda thinking similar to SOAP handlers/interceptors, but I know
its a bit different in a REST world.

So, only option currently to use a Filter? Or am I missing something?

Thanks
Andy O