tomcat-users mailing list archives

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

"Natalie Forood" <nforood@yahoo.com> wrote in message 
news:206003.52131.qm@web35302.mail.mud.yahoo.com...
> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message