Hi Christopher,
In case you run within a Servlet container,
you should be able to inject the original Servlet request:
@javax.ws.rs.core.Context HttpServletRequest req;
and then to obtain the address from there: req.getRemoteAddr()
Or do you use any other container?
~Jakub
On 13.10.2011 20:00, Christopher Piggott wrote:
> Hi,
>
> I have a ContainerRequestFilter that implements authentication in a
> largish jersey application. Someone has asked me to print the IP
> address of the remote client in the event of an authentication filter.
> I can't figure out how to do this...
>
> @Override
> public ContainerRequest filter(ContainerRequest cr) {
> ... stuff ...
> }
>
> How can I get the remote address from a ContainerRequest?
>
> --Chris
>