The title pretty much says it all, I have written a REST webservice in Java using JAX-RS and Jersey, and I would like to extract the I.P. address of the client that hits it in my code. If I have a class like this:
@Path("/service")
public class Service {
@GET
public void doAction () {
// ...
}
}
What do I do from there?
P.s. I'm not asking for debugging help, I'm asking how I can retrieve the IP address of the client that connects to my web service. @ANyarThar provided a good answer.