You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steven Punte <st...@yahoo.com> on 2002/05/20 21:15:05 UTC

How to obtain org.apache.cocoon.environment.Environment?

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));
  }

  As how one obtains session and request, but the
  above always returns null.  

  Cocoon 2.0.2.

  Thanks in advance.

  Steve Punte


__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: How to obtain org.apache.cocoon.environment.Environment?

Posted by Vadim Gritsenko <va...@verizon.net>.
> 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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>