Hi,
I know it's been a while, but we just moved to jersey 0.6, and I
noticed my ResourceConfig instance is null.
Both in the constructor, and my GET method, does not get injected I guess.
So I moved back to 0.5, and noticed it never has been, I just had a fallback :-)
I don't see anything suspicious in the logs, but I'm not sure what I'm
looking for.
So my question is: what should I be looking for to track this down? :-)
Linux, Glassfish v2, Jersey 0.5 or 0.6 deploying via ServletContainer.
On 3/4/08, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> Any init-param name and value automatically gets added to the
> ResourceConfig properties map, the values get added as String instances.
>
> You can then inject a ResourceConfig onto your class:
>
> @Path("/")
> public class Resource {
> @Context ResourceConfig rc;
>
> @GET public String get() {
> return
> rc.getProperties().get("my-servlet-init-param-property");
> }
> }
>
Thanks!
Gabor Szokoli