You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by luca morlando <lu...@b-k.it> on 2005/02/25 11:55:14 UTC
Re: stream in flowscript [SOLVED]
Leszek Gawron wrote:
> or do the following:
>
> importClass( Packages.org.apache.excalibur.source.SourceResolver );
> importClass( Packages.org.apache.excalibur.source.Source );
> importClass( Packages.org.apache.cocoon.components.source.SourceUtil );
> importClass( Packages.org.apache.cocoon.xml.dom.DOMUtil );
>
> function getRequestBodyDocument() {
> 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 );
> }
> }
> }
>
>
This is great !
thanks, Luca.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org