Hi All,
I turned on the Reverselookup in my httpd.config file, and also enabled
lookup on the connector in my server.xml.
When getRemoteHost method is invoked it is returning the ipaddress of my
system instead of hostname (which iam expecting).
* I tried by using Inetaddress in my servlet
I am using Tomcat 4.0.6 and our customer ran into a weird and
hard-to-reproduce problem. From the log, we see within one servlet,
HttpServletRequest.getRemoteHost return host name (enableLookups=true in
server.xml). However, during the running, one HttpProcessor thread suddenly
switch to
On Fri, Jul 09, 2004 at 06:49:51PM +, Michael Tang wrote:
: I am using Tomcat 4.0.6 and our customer ran into a weird and
: hard-to-reproduce problem. From the log, we see within one servlet,
: HttpServletRequest.getRemoteHost return host name (enableLookups=true in
: server.xml). However,
It is not the problem with the tomcat log. It is our appliation log shows
that that getRemoteHost returned an IP instead of host name. It shouldn't
be a network problem because the call does return the host name for a period
of time. But we are not sure what our web application does
Hi Everyone
I am using Tomcat 4.1.29 and the getRemoteHost() call from HttpServletRequest
is returning null.
Do i need to need to configure anything for this api to work ?
Thanks
Surendra
Hi,
by default enableLookups is enabled (==true)
You can add the parameter enableLookups=true to a Connector, then
getRemoteHost() gives you the desired information
Carsten
Surendra Kumar wrote:
Hi Everyone
I am using Tomcat 4.1.29 and the getRemoteHost() call from HttpServletRequest
]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, June 21, 2004 2:55 PM
Subject: Re: HTTPRequest object returns null for getRemoteHost()
Hi,
by default enableLookups is enabled (==true)
You can add the parameter enableLookups=true to a Connector, then
getRemoteHost() gives you
Hi
I am using Tomcat 4.1.29 with JK connector. The api
request.getRemoteHost() returns null.
I also made enableLookup=true in the connector properties Is there
anything else i need to configure ?
Thanks
Surendra
-
To
Hi,
For some reason, getRemoteHost is returning null. getRemoteAddr works fine.
I'm running Tomcat 4.0.4 with the AJP 13 connector:
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=0
Hi, can anyone tell me if it^s normal with TC 3.3.x to get
localhost/127.0.0.1 instead
of the correct remote ip with response.getRemoteHost/Addr()
It's the default state of this tc implementation since the first day.
Examples in /examples have the same problem.
TC 3.3.x
Linux RH 7.2
Ihr
Hi, can anyone tell me if it^s normal with TC 3.3.x to get
localhost/127.0.0.1 instead
of the correct remote ip with response.getRemoteHost/Addr()
It's the default state of this tc implementation since the first day.
Examples in /examples have the same problem.
TC 3.3.x
Linux RH
Hi all
When I call the ServletRequest's getRemoteHost()-method, I get sometimes the
fully quialified name and sometimes the IP of the remote host. This is the
case also, if the fully qualified name is aviable to the Solaris the server
is running on (using nslookup). Now, is there a way to force
-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 18 July, 2002 9:18 AM
To: [EMAIL PROTECTED]
Subject: getRemoteHost(): how to get the fully qualified name?
Hi all
When I call the ServletRequest's getRemoteHost()-method, I get sometimes the
fully quialified name and sometimes the IP
whether ipAddress is nnn.nnn.nnn.nnn or the host name. So you
can pass whatever you get from getRemoteHost() through this.
The assumption you mention (the fully qualified name is available to the
Solaris the server is running on) is important. The above will throw an
UnkownHostException
To: Tomcat Users List
Subject: RE: getRemoteHost(): how to get the fully qualified name?
Howdy,
You can convert IP to host name yourself. Here's the relevant section
of the code:
String ipAddress = 123.456.789.123;
InetAddress ia = InetAddress.getByName(ipAddress);
String hostname = ia.getHostName
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:09 PM
To: 'Tomcat Users List'
Subject: RE: getRemoteHost(): how to get the fully qualified name?
I applied your method to get the names. It works for some IPs. It didn't the
name of other IPs. For example, 12.5.203.134 was not converted
Message-
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:09 PM
To: 'Tomcat Users List'
Subject: RE: getRemoteHost(): how to get the fully qualified name?
I applied your method to get the names. It works for some IPs. It
didn't
the name of other IPs. For example
you can't use it
programmatically which
is what Mr. Li is looking for.
Yoav Shapira
Millennium ChemInformatics
-Original Message-
From: Jack Li [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 12:09 PM
To: 'Tomcat Users List'
Subject: RE: getRemoteHost(): how to get
Couldn't you exec a whois and parse it? Yeah, it probably wouldn't be
the prettiest thing you ever saw, and you just blew you
platform-independence, but if the functionality is that key, it may be
your only option.
Cunningham Emmett wrote:
There was an interface that was sorta usable from
a
We have moved from tomcat 3.2.1 to 3.3. We have one of our functionality
depend on identifying the client based on the client IP/Hostname.
In 3.2.1 ServletRequest.getRemoteHost() returns the DHCP address for the
client, where as in 3.3 it always returns as localhost. I have seen a bug no
3944
: Tomcat 3.3 getRemoteHost always returns localHost - Is there
any 3.3 production version has patch applied
We have moved from tomcat 3.2.1 to 3.3. We have one of our functionality
depend on identifying the client based on the client IP/Hostname.
In 3.2.1 ServletRequest.getRemoteHost() returns
-
From: Jayakumar Duraisamy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 2:22 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 3.3 getRemoteHost always returns localHost
- Is there
any 3.3 production version has patch applied
We have moved from tomcat 3.2.1 to 3.3. We have one
can give it a try.
Cheers,
Larry
-Original Message-
From: Rizki Wicaksono [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 12, 2002 2:49 PM
To: [EMAIL PROTECTED]
Subject: Why does getRemoteHost() always return localhost ??? :((
I used tomcat-3.2.3 and I don't have any
I used tomcat-3.2.3 and I don't have any problem when accessing
http://mytomcatserver:8080/examples/jsp/snp/snoop.jsp
from any machine.
This page return that machine IP address and hostname.
Now, I upgrade my server to tomcat-3.3, and I do have a problem when
accessing :
Modified my code many times with getRemoteHost(), still only remote host's
IP, no host name. DNS lookups are enabled by default, setting is
enableLookups=true .
Any advise? thanks!
Franco
Here is my server.xml file, created by installation
I have the same problem and I can't solve it either.
Mark
- Original Message -
From: Miao, Franco CAWS:EX [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 31, 2001 5:15 PM
Subject: getRemoteHost()
Modified my code many times with getRemoteHost(), still only remote
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
: 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
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(
I thought I could get the remote hostname in a Servlet
or jsp file. The following returns nothing for getRemoteHost():
FORM
HostIP="%= request.getRemoteAddr() %"
INPUT TYPE='text'
NAME='hn'
VALUE="%= request.getRemoteHost() %"
SIZE
30 matches
Mail list logo