tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Natalie Forood <>
Subject Re: Getting the tomcat server IP
Date Sat, 21 Feb 2009 15:09:24 GMT
Thanks so much to all who replied; I will try all your suggestions and report back with what
worked best in our setup.

From: Yuval Perlov <>
To: Tomcat Users List <>
Sent: Friday, February 20, 2009 11:54:17 PM
Subject: Re: Getting the tomcat server IP


You can only get your actual IP after opening a connection. Of course it can change depending
on where the connection is coming from.

Alternatively you can open a connection to a known public server, and figure out your IP using
the resulting socket. If you are going through a NAT this might not be your actual IP but
the IP on your side of the NAT.

Yuval Perov

On Feb 20, 2009, at 2:21 AM, Natalie Forood wrote:

> Hello,
> Can you tell me how I can get the IP address of the interface that is running Tomcat? 
I can't use localhost, I need the IP of the physical interface.
> Thanks,
> Natalie

To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message