Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 57706 invoked from network); 17 Nov 2000 07:47:38 -0000 Received: from gilberto.physik.rwth-aachen.de (137.226.30.2) by locus.apache.org with SMTP; 17 Nov 2000 07:47:38 -0000 Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.9.3/8.9.3) id IAA49982 for tomcat-user@jakarta.apache.org; Fri, 17 Nov 2000 08:47:37 +0100 (CET) (envelope-from kuku) Date: Fri, 17 Nov 2000 08:47:37 +0100 From: Christoph Kukulies To: tomcat-user@jakarta.apache.org Subject: Re: getRemoteHost() returns "" Message-ID: <20001117084737.A49925@gil.physik.rwth-aachen.de> References: <200011160943.KAA44536@gilberto.physik.rwth-aachen.de> <3A1429C7.E12FCF38@eng.sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3A1429C7.E12FCF38@eng.sun.com>; from Craig.McClanahan@eng.sun.com on Thu, Nov 16, 2000 at 10:39:03AM -0800 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Thu, Nov 16, 2000 at 10:39:03AM -0800, Craig R. McClanahan wrote: > Christoph Kukulies wrote: > > > I thought I could get the remote hostname in a Servlet > > or jsp file. The following returns nothing for getRemoteHost(): > > > >
> > HostIP="<%= request.getRemoteAddr() %>" > > > NAME='hn' > > VALUE="<%= request.getRemoteHost() %>" > > SIZE='15'> > >
> > > > > > I was suspecting it is a name resolution (DNS) problem but my > > nameresolution sequence is hosts, then bind. And the host 192.168.1.119 > > for example (it's an intranet) can be found. > > > > Any clues? > > What version of Tomcat are you trying this with? It appears to work fine > for me with 3.2b7 and 4.0m4, as long as DNS is correctly configured on the > machine that Tomcat is running on. I'm still using 3.1 beta. I just found that the Snoop servlet exposes the same behaviour. When I would upgrade to 3.2b7 (or what that is at the moment), what differences would I have to expect? Could I migrate the webapps tree and tomcat-apache.conf seamlessly? -- Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de