Derek Hohls schrieb:
Hello,
> Thank's for the replies,
> Both using an action, and using a flowscript seem promising, but also
> problematic.
>
> For the flowscript solution to work, I need to read the xQuery result
> from a cocoon pipeline. Unfortunately, cocoon.processPipelineTo() does
> not work as in this example:
> readImage() {
> // get request uri in here somehow
> var realfile =
> cocoon.processPipelineTo("flow/locateimage"+cocoon.getRequestUri());
>
> //parse response
> var realFilename = getFilenameFromResponse(realfile);
>
> Cocoon.sendPage("flow/readimage/"+realFileName");
> }
> processPipelineTo wants an outputstream to send the response to,
> rather than storing it in a variable, as I need to do. Is there a way
> around this?
Just do it like this (if i got you right):
var output = new Packages.java.io.ByteArrayOutputStream();
cocoon.processPipelineTo("flow/locateimage"+cocoon.getRequestUri(),null,output);
var realFilename = getFilenameFromResponse(output.toString());
// or whatever you want to do with it
HTH
Christoph
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]