users@jersey.java.net

Re: [Jersey] Re: Can't get _at_Context Application be injected

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Fri, 30 Jul 2010 17:22:32 +0200

Hi Johannes,

Is it possible to send me a zipped maven project or something
equivalent so i can reproduce, as i cannot reproduce the error you
observe with my own investigations?

Thanks,
Paul.

On Jul 30, 2010, at 5:18 PM, Johannes Schade wrote:

>
> Dear Paul
>
> Thank you very much for your detailed reply. I try to use
> servletContext in
> my application subclass. I use
>
> @Context ServletContext svltCx;
>
> as a class field and then
>
> this.svltCx.getContextPath()
>
> in the constructor. However I always get a null pointer error
> because svltCx
> is null. The lib directory contains:
> asm-3.1.jar
> jersey-core-1.3.jar
> jersey-server-1.3.jar
> json.jar
> jsr311-api-1.1.jar
>
> So I am well using version 1.3. This seems to be proven also by the
> fact
> that I am able to inject the servletContext on the resources.
>
> Best regards, Johannes
>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Can-t-get-Context-Application-be-injected-tp5128719p5355382.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>