tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Retrieving host name
Date Tue, 21 Feb 2006 01:02:11 GMT

<Zorro3692@aol.com> wrote in message news:22c.6babee8.312bb9b0@aol.com...
> Hi,
>
> Is there code for retrieving server address (IP address?) too?
>

request.getLocalAddr();

Note that this may not match the result of request.getServerName(); if 
natting or proxies are involved.

> Thanks.
>
> request.getServerName()
>
>
>> -----Original Message-----
>>  From: Amir Sadeh [mailto:amir@lastversion.com]
>> Sent: Sunday, February  19, 2006 10:57 AM
>> To: users@tomcat.apache.org
>> Subject:  Retrieving host name
>>
>> Hi,
>> How can I retrieve the host  name (defined in the tomcat
>> server.xml) or some unique host id in a  JSP/Servlet code?
>>
>>
>> Regards,
>> Amir  S
>
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message