Sunday, June 3, 2012

How to determine remote host on a RESTful Web Service

This is your Restfull service (At least one method):


As you can see, we don't have available the popular Request object, now what we can do is just to add another parameter to our method, and Listo!
@Context javax.servlet.http.HttpServletRequest request