users@jersey.java.net

[Jersey] Re: Injection of HttpServletRequest-Context in ContainerRequestFilter does not work

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Tue, 18 Jun 2013 18:00:29 +0200

Hi Ashwin,

while the behavior that you describe is an obvious bug (please file a new issue in https://java.net/jira/browse/jersey ), why are you trying to inject the Request in your filter? All the information that Request API provides is passed to the filter method as part of the filter context instance.

Marek

On Jun 18, 2013, at 5:34 PM, Ashwin Ravindran <ashw.reddi_at_gmail.com> wrote:

> Hey,
>
> I am using Jersey 2.0 and not able to inject Request object into my filter. I am getting java.lang.IllegalStateException: Not inside a request scope this error while trying to inject. Please let me know whether there is any work around for this issue
>
> --
> Thanks
> Ashwin