users@jersey.java.net

Re: [Jersey] Is there a way to programmatically attach my excewption mappers?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 24 Mar 2009 16:55:39 +0100

On Mar 24, 2009, at 4:26 PM, Mats Henricson wrote:

> Hi!
>
> I've seen and used the @Provider annotation, but is there any way I
> can wire
> up my resource and these mappers programatically (not using
> annotations)?
>
> This could help me get my unit tests through, by subclassing
> Application.
>

You still need to use the annotations but you can change the
registration strategy by subclassing Application. See:

http://wikis.sun.com/display/Jersey/Overview+of+JAX-RS+1.0+Features#OverviewofJAX-RS1.0Features-DeployingaRESTfulWebservice

Paul.