Re: Client IP number?

Will Scheidegger <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Thanks for the replies. Yes, context().request().hearderForKey 
("host") will get you the name of the server the app is served from  
(i.e. virtual host). That's the reason why I posted my question in  
the first place. I then looked at all header keys but either  
"remote_address" was not listed or I missed it.

So thanks again for your help.

-Will

On 22.02.2006, at 22:21, Denis Stanton wrote:

>
> On 23/02/2006, at 10:12 AM, Jon Nolan wrote:
>
>> Denis Stanton wrote:
>>>
>>>         String hostString = context().request().headerForKey  
>>> ("host");
> <snip>
>>
>> Aren't host and/or http_host going to get you the server name?
>
> Thanks Jon
>
> You are right of course.  My bad.  I scanned an old project  
> hurriedly, found the wrong pice of code and pasted it.    :-(
>
> I think someone else has given the correct answer, so I'll just go  
> and up my caffeine level and see if that helps
>
> Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.