tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: getRemoteHost() returns ""
Date Thu, 16 Nov 2000 18:39:03 GMT
Christoph Kukulies wrote:

> 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='15'>
> </FORM>
> </html>
>
> 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.

>
> --
> Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

Craig McClanahan



Mime
View raw message