Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 62063 invoked from network); 21 Feb 2009 07:54:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2009 07:54:59 -0000 Received: (qmail 27693 invoked by uid 500); 21 Feb 2009 07:54:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 27667 invoked by uid 500); 21 Feb 2009 07:54:47 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 27656 invoked by uid 99); 21 Feb 2009 07:54:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 23:54:47 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [74.208.64.127] (HELO r-u-on.com) (74.208.64.127) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2009 07:54:39 +0000 Received: from [192.168.1.105] ([77.127.229.141]) by r-u-on.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 21 Feb 2009 02:54:16 -0500 Message-Id: <6C83F142-BD61-47DC-9D02-A64903E38FA9@r-u-on.com> From: Yuval Perlov To: "Tomcat Users List" In-Reply-To: <206003.52131.qm@web35302.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Getting the tomcat server IP Date: Sat, 21 Feb 2009 09:54:17 +0200 References: <206003.52131.qm@web35302.mail.mud.yahoo.com> X-Mailer: Apple Mail (2.930.3) X-OriginalArrivalTime: 21 Feb 2009 07:54:16.0983 (UTC) FILETIME=[98678270:01C993F9] X-Virus-Checked: Checked by ClamAV on apache.org request.getRemoteAddr(); You can only get your actual IP after opening a connection. Of course it can change depending on where the connection is coming from. Alternatively you can open a connection to a known public server, and figure out your IP using the resulting socket. If you are going through a NAT this might not be your actual IP but the IP on your side of the NAT. Yuval Perov On Feb 20, 2009, at 2:21 AM, 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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org