When using JAX-RS is there a way of getting information about who is calling the webservice? Can we get the ip or url of the calling application? If so how do you do it?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The below should work on Weblogic (servlet container).
Once you get the
HttpServletRequestvia the@Context, you can access any of the methods of HttpServletRequest.Note that there is no way to figure out what the real client IP address if there are any proxies in between.