little correction: you shouldn't do it via an XSP, because XSPs are supposed
to be generators, i.e. they must emit SAX events, and have their output
serialized by a serializer. you should implement a reader instead, which is
supposed to combine those two steps.

what it boils down to (when inheriting from AbstractReader)
 - get your data from the db
 - know what you're emitting (mime content type)
 - set the response content type (override getMimeType())
 - write the data to the (servlet) output stream (AbstractReader.out) from
within generate()

I don't have example code at hand, but there must somewhere be a
DatabaseReader (cocoon 2.0.4? 2.1.x?), IIRC in the scratchpad. it does more
or less what you seem to be wanting.


> -----Ursprungliche Nachricht-----
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag
> von beyaRecords - The home Urban music
> Gesendet: Donnerstag, 12. Februar 2004 11:50
> An: [EMAIL PROTECTED]
> Betreff: Re: AW: reading binary stream into xsp page
>
>
> Marco,
> On 12 Feb 2004, at 10:41, Marco Rolappe wrote:
>
> > you can of course
> > have that URL be handled by an XSP that emits the data you get from
> > the db
> > as e.g. a gif image (image/gif), if it was a gif stream.
>
> how so I do the above? Do you have any example code I can see?
>
>
> many thanks in advance
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to