users@jersey.java.net

Re: [Jersey] Injection question - Guice + HttpServletRequest

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Wed, 07 Oct 2009 14:33:37 -0400

On Oct 7, 2009, at 2:06 PM, DirkM wrote:
>
> Marc Hadley wrote:
>>
>> You can still get the HttpHeaders as a field:
>> @Context HttpHeaders headers;
>>
>
> I tried that but it gave me a NullPointerException when I tried to
> access
> it. I was under the impression you can only use @Context in certain
> situations, such as within a Resource class...
>
Right, sorry I thought it was a resource class. My mistake.

Marc.