users@jersey.java.net

Re: [Jersey] embedding jersey inside GrizzlyWebServer

From: Zoltan Arnold NAGY <Zoltan.Nagy_at_Sun.COM>
Date: Tue, 28 Apr 2009 12:32:10 +0200

Paul Sandoz wrote:
>
> The problem is specific to the way the the initialization parameter is
> set.
>
> You need to call:
>
> jerseyAdapter.addInitParameter("javax.ws.rs.Application",
> JerseyAdaptor.class.getName());
you're right, I missed the part where I had to use addInitParameter
instead of setParameter :)

but still no luck, it's not working.

first I tried to whip up a simple, one-file example, but apperently, the
packages must be public
in order to work this way

(else I'd get Caused by: java.lang.IllegalAccessException:
Class com.sun.jersey.spi.container.servlet.WebComponent can not access a
member of class JerseyAdaptor with modifiers "",
which is okay from the stacktrace, as the container is in an other
package, so cant see mine.)

so I split them up. Here's the complete code:
http://nagyz.pastebin.com/m5d97e7db

I get a 404 when I try to access it, so it seems Jersey hasnt discovered
my resource.

Any ideas would be greatly appreciated! Sorry for being such a noob, I
just started using jersey. :)

Thanks,

Zoltan