cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Sutic" <leo.su...@inspireinfrastructure.com>
Subject RE: CONTEXT_ENVIRONMENT_CONTEXT can be null ?
Date Fri, 22 Feb 2002 13:24:06 GMT
Try:

Constants.java:

    /**
     *The name of a <code>Context</code> object in the so called objectModel
<code>Map</code>.
     * This constant is also defined in the
org.apache.cocoon.environment.ObjectModelHelper class.
     *
     * FIXME(GP): Shouldn't this definition here be removed?
     */
    String CONTEXT_OBJECT  = "context";

You can then use Constants.CONTEXT_ENVIRONMENT_CONTEXT on the returned
Context
to get the Environment context.

/LS

> From: Thorsten Mauch [mailto:mauch@imkenberg.de]
> Sent: den 22 februari 2002 13:41
> To: 'cocoon-dev@xml.apache.org'
> Subject: CONTEXT_ENVIRONMENT_CONTEXT can be null ?
>
>
> Hi
> I try to look up the context but I receive null
> The code in my actions simply looks like:
>   	Context context =
> (Context)objectmodel.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT);
>       	if(context == null)
>         		System.out.println("no context");
>
> I run cocoon with tomcat, so I expect a Environment to exist ?
> or does I understand the context object wrong ?
>
> Thx Thorsten
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>


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


Mime
View raw message