tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Bremford" <mi...@paperx.com>
Subject RE: Host name
Date Wed, 27 Sep 2000 16:53:39 GMT
Try request.getServerName(). Haven't tried it, but it's supposed to work.

Cheers... Mike

> -----Original Message-----
> From: David Oxley [mailto:dave@staffplanner.co.uk]
> Sent: 27 September 2000 17:34
> 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