> From: Steven Punte [mailto:[EMAIL PROTECTED]] > > 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>