How to get Client IP Address using Java

You may also like...

Subscribe
Notify of
guest
6 Comments
Oldest
Newest
Inline Feedbacks
View all comments
anonymous
anonymous
June 14, 2016 14:46

Thank you !

Andok
Andok
February 16, 2017 16:04

hi all, im a new java developper. Kindly tell me how to call this getClientIpAddress with its parameter HttpServletRequest request

Memorynotfound.com
Memorynotfound.com
February 17, 2017 09:37
Reply to  Andok

Hello Andok,

You need to pass an instance of the HttpServletRequest, in order to get the client IP address.
You can obtain this instance for example, from a Servlet, Web Service or Rest service, depending on your needs.

Kr,
Memorynotfound

Vignesh
Vignesh
September 18, 2018 07:36

Hi,
Is anyone know how to get the MAC address from a client machine using java?

prajwal
prajwal
November 30, 2018 10:08

But I am still getting the proxy ip not the real ip please help

6
0
Would love your thoughts, please comment.x
()
x