Could it be that the value injected is cached under the service-property... 
expression, and not recognised as derived from a threaded object.

<[EMAIL PROTECTED]> skrev i en meddelelse 
news:[EMAIL PROTECTED]
>> Hi,
>>
>>   I am trying to get the remote host ip by using:
>>
>>
>> @InjectObject("service-property:tapestry.globals.HttpServletRequest:remoteHost")
>>  public abstract String getRemoteHost();
>>
>>   If I connect to the server from two different pc's, the second pc will 
>> show
>> the first one's ip address. Is the HttpServletRequest cached? Someone 
>> earlier
>> had asked a similar question but I did not see a solution.
>
> Indeed, it doesn't work this way - and I thought it would :(
>
> Anyway, inject the HttpServletRequest
> and do a getHttpServletRequest().getRemoteHost()
>
> The HttpServletRequest isn't cached, it's stored in a treadlocal, so the 
> above
> will work.
> But I don't actually know why the direct injection of the remotehost 
> doesn't
> work...I'll have to look into it :)
>
>
>
>>
>>   Thanks,
>>   Amir
>>
>
>
> -- 
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to