tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <c...@cincom.com>
Subject RE: getRemoteAddr() vs getRemoteHost()
Date Mon, 29 Oct 2001 14:45:11 GMT
does your computer have an internet name? You can try 'nslookup' at the
command prompt to see if your address resolves to a name. 

Not all internet IP's have resolving names. 

Charlie

> -----Original Message-----
> From: Miao, Franco CAWS:EX [mailto:Franco.Miao@gems7.gov.bc.ca]
> Sent: Sunday, October 28, 2001 12:22 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: RE: getRemoteAddr() vs getRemoteHost()
> 
> 
> This is what my current seting in server.xml file, but still 
> no luck! Aslo I
> check all enableLookups value in server.xml file, they all are "true".
> 
> --------------------------------------------------------------
> --------------
> -------------------
> 
>  By default, DNS lookups are enabled when a web application calls
>          request.getRemoteHost().  This can have an adverse impact on
>          performance, so you can disable it by setting the
>          "enableLookups" attribute to "false".  When DNS lookups are
> disabled,
>          request.getRemoteHost() will return the String version of the
>          IP address of the remote client.
>     -->
> 
>     <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
>     <Connector 
> className="org.apache.catalina.connector.http.HttpConnector"
>                port="80" minProcessors="5" maxProcessors="75"
>                enableLookups="true" redirectPort="8443"
>                acceptCount="10" debug="0" connectionTimeout="60000"/>
>     <!-- Note : To disable connection timeouts, set 
> connectionTimeout value 
>      to -1 -->
> 
> Franco 
> 
> 
> -----Original Message-----
> From: Yoav Shapira [mailto:shapira@mpi.com]
> Sent: Friday, October 26, 2001 6:46 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: getRemoteAddr() vs getRemoteHost()
> 
> 
> Hi,
> My guess is you need to enable remote address lookups in your 
> server.xml.  Since they are expensive to log, they are usually turned
> off by default, and the behavior is to simply return the address
> rather than the host.
> 
> Yoav
> 
> "Miao, Franco CAWS:EX" wrote:
> > 
> >  When I put the following code in my Jsp, it comes up two identical
> > remote IP addresses, instead of one remote IP and one 
> remote host name. My
> > computer  has Internet IP and valid Internet DNS server. 
> Any suggestion
> > about
> > that?
> > 
> > Thanks!
> > 
> > out.print( request.getRemoteAddr() );
> > out.print( request.getRemoteHost() );
> > 
> > Franco
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 

--
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