users@jersey.java.net

[Jersey] Re: Get the IP addr associated with cinoming request

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Wed, 30 Mar 2011 17:12:30 -0700

I do not think so. It is a bit too low level, i am afraid.
And i am even not sure how to get this inforamtion
for the local interfaces in Java...

~Jakub

P.S. Please also note, that for the IP address itself,
Jersey relies on the underlying container.

On 03/30/2011 02:04 PM, Arthur Yeo wrote:
> Thanks, Jakub, I saw getRemoteAddr() and that helps.
>
> Is there anything for the remote MAC address?
>
> On Wed, Mar 30, 2011 at 1:51 PM, Jakub Podlesak
> <jakub.podlesak_at_oracle.com <mailto:jakub.podlesak_at_oracle.com>> wrote:
>
> On the Servlet container, you should be able to get
> the HttpServletRequest injected:
>
> @Context HttpServletRequest req;
>
> and get the address from there.
>
> Does it help you?
>
> ~Jakub
>
>
> On 03/30/2011 01:19 PM, Arthur Yeo wrote:
>
> All,
> When servicing a request in Jersey, is there a fast way to
> obtain the IP-addr of the client?
>
> --
> Arthur Y.
>
>
>
>
>
> --
> Arthur Y.