tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul FitzPatrick" <cpclv...@fitzpatrick.cc>
Subject RE: Host name
Date Wed, 27 Sep 2000 17:02:18 GMT

How about trying request.getHEaders or request.getRequestURI

The second will require some parsing, but you should be able to get it from
there.

Regards,
Paul


-----Original Message-----
From: David Oxley [mailto:dave@staffplanner.co.uk]
Sent: Wednesday, September 27, 2000 12:34 PM
To: tomcat-user@jakarta.apache.org
Subject: Host name


I need to retrieve the host name of the server on which I am currently
running. I used:
InetAddress.getLocalHost().getHostName();
...but this returns the wrong host if it is a virtual host that took the
HttpRequest.
How can I get the name of the virtual host.
Thanks.
Dave
Dave@Staffplanner.co.uk


Mime
View raw message