I'm writing a JAX-RS REST API in a Jersey Netty container. I need to get the client IP address in a resource that I am working on. Most people specify to add @Context HttpServletRequest
to get it, however this is either null or throws a ClassNotFoundException
as I don't have a servlet. I would find it odd if this use-case isn't supported, does anyone know how to get hold of the client IP?
Asked
Active
Viewed 193 times
1

Martin
- 2,606
- 4
- 24
- 38