Jersey RESTful Web Service - How to determine remote host
Joined: Mar 03, 2009
How can one get the remote address and/or hostname of the client endpoint that originated a request within a Jersey Resource class?
I had a look at the injectable objects available via the @Context annotation, but none provide that sort of information.
Any pointers are much appreciated
Joined: Aug 19, 2005
Welcome to Javaranch!
If Jersey is hosted by a Servlet Container you should be able to use: