You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Blumenthal <da...@wordchamp.com> on 2006/10/10 01:34:20 UTC

server IP address

Hopefully, a pretty easy question: how do you determine the IP address of
the server a servlet is running on?
Thanks!
Daniel

Re: server IP address

Posted by Martin Gainty <mg...@hotmail.com>.
Hello Dan-

take a look at obtaining host information via the AccessValve
for specifics on how to implement AccessValve I invite you to look at
http://tomcat.apache.org/tomcat-4.0-doc/config/valve.html#Access%20Log%20Valve

Anyone else?
Martin --

This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents

----- Original Message ----- 
From: "Daniel Blumenthal" <da...@wordchamp.com>
To: "'Tomcat Users List'" <us...@tomcat.apache.org>
Sent: Monday, October 09, 2006 7:34 PM
Subject: server IP address


> Hopefully, a pretty easy question: how do you determine the IP address of
> the server a servlet is running on?
> Thanks!
> Daniel
>

Re: server IP address

Posted by Len Popp <le...@gmail.com>.
In a servlet, request.getLocalAddr() will return the server's IP address.
-- 
Len

On 10/9/06, Daniel Blumenthal <da...@wordchamp.com> wrote:
> Hopefully, a pretty easy question: how do you determine the IP address of
> the server a servlet is running on?
> Thanks!
> Daniel
>
>

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