cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <u....@cbim.it>
Subject Re: Serving arbitrary OutputStreams with Cocoon
Date Tue, 13 Apr 2004 16:41:54 GMT
Oscar Picasso wrote:
> Hi,
> 
> I have a Java application that can generate Postscript or PDF to OutputStreams.
> I would like to be able serve these OutputStreams with Cocoon.
> 
> I have looked at ReaderResource but it seems to read resources from the file
> system.

The cleanest way would be to wrap your components with a class that 
implement the Source interface and use it directly from the ResourceReader:

   <map:read src="myscheme:whatever"/>

You can find a detailed example in Langham & Ziegeler's book "Cocoon: 
Building XML Applications" (New Riders).

Alternatively, you can copy&paste ResourceReader and change 
"inputSource.getInputStream" to "myComponent.getInputStream" etc.

	Ugo


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


Mime
View raw message