cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luca morlando <luca.morla...@b-k.it>
Subject Re: stream in flowscript [SOLVED]
Date Fri, 25 Feb 2005 10:55:14 GMT
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


Mime
View raw message