users@jersey.java.net

Re: [Jersey] ServeltContext is always null

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 30 Jul 2009 07:28:35 +0200

Hi George,

A couple of questions:

- what version of Jersey are you using?

- have you configured Jersey to be deployed as a Servlet or a Filter?

- are you deploying using a Web container, such as GlassFish or
Tomcat, or an embedded server such as Grizzly ?

Paul.

On Jul 29, 2009, at 10:35 PM, George Hallak wrote:

> Hi,
>
> I'm trying to inject ServletContext, but it's always null. The code
> I'm using is:
>
> @Context ServletContext context;
>
> I'm able to inject HttpServletRequest, but ServletContext is always
> null.
> Any suggestion?