You have access to it by using cocoon.context variable that is setup.
If you are trying to read something, you may want to get a
SourceResolver. I grabbed this off a Google search.
importClass( Packages.org.apache.excalibur.source.SourceResolver );
importClass( Packages.org.apache.excalibur.source.Source );
importClass( Packages.org.apache.cocoon.components.source.SourceUtil );
var resolver = null;
var source = null;
try {
resolver = cocoon.getComponent( SourceResolver.ROLE );
source = resolver.resolveURI(
"module:request:inputStream" );
var document = SourceUtil.toDOM( source );
return document;
} finally {
if ( resolver != null ) {
if ( source != null )
resolver.release( source );
cocoon.releaseComponent( resolver );
}
}
}
On Fri, 11 Mar 2005 08:42:58 -0500, Ben Anderson
<[EMAIL PROTECTED]> wrote:
> Hi,
> what's the best way to get the
> org.apache.cocoon.environment.Context in flow? I'd like to call the
> method getResourceAsStream() which I don't see as a method in any of
> the objects already in flow's scope.
> Thanks,
> Ben
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]