cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: Request object with ServiceManager
Date Mon, 07 Nov 2005 13:18:35 GMT
Felix Röthenbacher wrote:
> 
> 
> Upayavira wrote:
> 
>> Felix Röthenbacher wrote:
>>
>>>
>>> Upayavira wrote:
>>>
>>>
>>>> Felix Röthenbacher wrote:
>>>>
>>>>
>>>>> Hi
>>>>>
>>>>> is it possible to get the current Request object with the
>>>>> help of the ServiceManager?
>>>>
>>>>
>>>>
>>>>
>>>> You're more likely to get the request object via the ObjectModel. If
>>>> you
>>>> have an object model, use ObjectModelHelper.getRequest(om).
>>>>
>>>> I'd need to know the context in which you're trying to get the request
>>>> before I could say any more.
>>>
>>>
>>>
>>> I only have the ServiceManager at hand, no context, no object model.
>>> Is there a component I can lookup to get the current request object?
>>
>>
>>
>> What version of Cocoon. Are you accessing from Java or Javascript?
> 
> 
> Cocoon 2.1.x, Java

Map om = CocoonComponentManager.getCurrentEnvironment().getObjectModel();
Request req = ObjectModelHelper.getRequest(om);

Regards, Upayavira

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


Mime
View raw message