users@jersey.java.net

[Jersey] Re: custom injector not working

From: Mark Thornton <mthornton_at_optrak.com>
Date: Sat, 20 Feb 2016 09:28:20 +0000

What container are you using? As far as I can recall, HttpServletRequest is
injected when running in a servlet container. It does not work in any of
the Http server containers (Grizzly, Jetty, JDK). The main thing I want
from a servlet request is the remote IP address, the absence of which is
awkward in the non servlet containers.

Regards,
Mark Thornton

On 19 February 2016 at 22:36, Trenton D. Adams <trenton.d.adams_at_gmail.com>
wrote:

> Good day,
>
> Okay, so, following the guide at
> https://jersey.java.net/documentation/latest/user-guide.html#d0e16644
> results in code at https://gist.github.com/anonymous/e16a60970e9f1e42c536
> and except stack trace at
> https://gist.github.com/anonymous/56676819f74ecefd604c
>
> It seems like Jersey doesn have an HttpServletRequest injector, so my
> injector doesn't work. Is that right? And if so, do the docs maybe need
> to be updated?
>
> Either way, how do I go about following the guide, and getting a custom
> injector working?
>
> Thanks.
>