users@jersey.java.net

Re: [Jersey] Newbie question: How do I inject objects into resources

From: Ian Clarke <ian.clarke_at_gmail.com>
Date: Tue, 24 Mar 2009 08:06:41 -0500

On Tue, Mar 24, 2009 at 1:56 AM, Craig McClanahan
<Craig.McClanahan_at_sun.com>wrote:

> If what you want is stored as a servlet context attribute (which you did
> not state AFAICT in your initial problem description)
>

I didn't state this because I didn't want to preempt the "right" way to do
this.


> , you can inject a ServletContext object already and have total access to
> it's capabilities. No extra code required ... and it's independent of which
> JAX-RS framework you choose also.
>

Can you point me to some simple example code that demonstrates this?

Many thanks,

Ian.

-- 
Ian Clarke
CEO, Uprizer Labs
Email: ian_at_uprizer.com
Ph: +1 512 422 3588
Fax: +1 512 276 6674