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:[EMAIL PROTECTED]]
Sent: Friday, October 26, 2001 6:46 AM
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to