tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rusty Wright <rusty.wri...@gmail.com>
Subject Re: Getting the tomcat server IP
Date Fri, 20 Feb 2009 18:47:18 GMT
Look at the servlet api docs; it appears that you can get the ip address; have look at javax.servlet.ServletRequest.getLocalAddr().

  http://java.sun.com/j2ee/1.4/docs/api/index.html


Natalie Forood wrote:
> Thanka, but if I have multiple interfaces on the server, how do I know which interface
to you from the ifconfig output?
> 
>  Natalie 
> 
> 
> 
> 
> 
> ________________________________
> From: Steve <stever@up-south.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Thursday, February 19, 2009 4:36:43 PM
> Subject: Re: Getting the tomcat server IP
> 
> 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
> ifconfig (linux/unix/mac osx)
> ipconfig (windows cmd line)
> 
> 
> 
> 
> -- eats the blues for breakfast,
> does unix for rent,
> plays harp for food,
> will play the flute for kicks
> rides for the freedom
> scrapes for the challenge
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message