tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: Getting the tomcat server IP
Date Fri, 20 Feb 2009 02:21:51 GMT

"Natalie Forood" <> wrote in message
> 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.

request.getLocalAddr() returns the IP address that the request was recieved 
on.  Note that if you are using AJP/1.3 than this is the IP address that 
Apache recieved the request on.

> Thanks,
> Natalie 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message