cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: How to obtain org.apache.cocoon.environment.Environment?
Date Wed, 22 May 2002 18:55:02 GMT
> From: Steven Punte [mailto:steve17110@yahoo.com]
> 
> Dear Cocoon User Group:
> 
>   How does one obtain the
>   org.apache.cocoon.environment.Environment?
> 
>   I've trying:
> 
>   public void setup( .... ) {
>     environment =
> (Environment)(objectModel.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT));

CONTEXT_ENVIRONMENT_CONTEXT is the key of the Environment in the Context
object, not objectModel.


Try something like:

ObjectModelHelper.getContext(objectModel).get(Constants.CONTEXT_ENVIRONM
ENT_CONTEXT);


Vadim


>   }
> 
>   As how one obtains session and request, but the
>   above always returns null.
> 
>   Cocoon 2.0.2.
> 
>   Thanks in advance.
> 
>   Steve Punte



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message