I have a REST- Server here using JERSEY. I must log the IP (better the DNS) of the calling client.
Can somebody point a direction which injection annotations to use ?
Searched "@Context", but could not find anything fitting.
Thanks Gerd
An instance of UriInfo can be injected as field or method parameter using the @Context annotation. UriInfo provides access to application and request URI information. jersey-server 2.25.1: Jersey core server implementation.
An instance of UriInfo can be injected as field or method parameter using the @Context annotation. UriInfo provides access to application and request URI information. jersey-server 2.25.1: Jersey core server implementation. jersey-container-servlet 2.25.1: Jersey core Servlet 3.x implementation.
UriInfo provides access to application and request URI information. jersey-server 2.25.1: Jersey core server implementation. jersey-container-servlet 2.25.1: Jersey core Servlet 3.x implementation. package com. logicbig. example; import javax. ws. rs. client.
If the SIP request carries a user=phone tag, the SIP URI will always be interpreted as a numeric SIP URI. If no user=phone is present, the decision is based on the dial string interpretation setting in the calling device's (endpoint or trunk) SIP profile.
you could add @Context HttpServletRequest request
as a parameter to your request handler method. And then get a hold of the client IP with request.getRemoteAddr()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With