users@jersey.java.net

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

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

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

> ws.addGrizzlyAdapter(sa);
>
> And this call is deprecated, with little or no documantation of
> what the suggested second String[] parameter should be.
>

It is the context path(s) like the context path of a web application.

Do this:

         ws.addGrizzlyAdapter(sa, new String[] {""} );

or:

         ws.addGrizzlyAdapter(sa, new String[] {"/"} );

which should be equivalent.

My understanding is the GrizzlyWebServer can be configured with a path
A, say, then an adapter can be added with a context path B say, and
then a servlet can be added with a servlet path C say, which
concatenated together, A + B + C, will give the base path to the
servlet from which requests will be served.

Paul.