users@jersey.java.net

Re: [Jersey] Re: Intercepting requests to resources and invoking other methods which in turn invokes the resource method

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Tue, 12 Oct 2010 12:52:55 +0200

On Oct 9, 2010, at 2:43 AM, DaHoopster wrote:

>
> Hi Paul,
>
> Thanks for the reply. I was on some other projects for a while and
> now I am
> back on doing jersey stuff again. So do you have an XML code snippet
> that
> sets up the ResourceFilterFactory and ResourceConfig? I assume it is
> configured in web.xml.
>

See JavaDoc here for an example of registration:

https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/container/filter/RolesAllowedResourceFilterFactory.html

See the JavaDoc of the property definition:

https://jersey.dev.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/api/core/ResourceConfig.html
#PROPERTY_RESOURCE_FILTER_FACTORIES

Basically any property/feature declared on the ResourceConfig can be
declared as a filter/servlet init param in the web.xml.

Paul.

> Thanks,
> Han
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Intercepting-requests-to-resources-and-invoking-other-methods-which-in-turn-invokes-the-resource-metd-tp5516338p5616923.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>