tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirill Maximov <...@actimind.com>
Subject Re: How to get IP address Tomcat bound to.
Date Sun, 26 Jan 2003 19:03:43 GMT
On  0, Mark <markd@bellsouth.net> wrote:
> At 1/26/2003 04:57 PM, you wrote:
> >  I have a programming question - how can I get
> >  the IP address the TomCat is bound to ? Is this possible?
> >
> >  I suppose, I have to use some internal TomCat API here ..
> >
> >  With kind regards,
> >  Kirill Maximov
> 
> Not sure if I understand your question, but will this work for you from w/i 
> a servlet or other class running under Tomcat?
> 
>    String ipaddr = InetAddress.getLocalHost().getHostAddress();

  Thanks a lot, that's what I was looking for!

> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>

-- 
Kirill Maximov aka KIR


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message