You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nils Kaiser <Ni...@gmx.de> on 2006/03/27 16:47:29 UTC

"Real" Pipeline Redirect

Hello,

in our newest project I wanted to try to implement a real pipeline 
redirect, i.e. restarting the pipeline with other parameters. I need to 
trigger this based on the pipeline content, thats why I need to do the 
processing in a transformer.

I wanted to get rid of the former solution I had here using a CInclude 
transformer with the cocoon:// protocol... and found a solution which 
does work but is not the clean way, and thats why I am asking for your 
opinion. Here is what I do:

1)  A java flow function is executed that calls processPipelineTo to 
render the pipeline to an outputstream.
2) A transformer that evaluates some expressions and decides if a 
redirect is needed. If true, an exception RedirectPipeline is thrown
3) The java flow function catches the exception and executes 1) again

If the pipeline is processed without RedirectException:
4) save the outputStream as request attribute.
5) call a reader ProcessedPipelineReader that writes the outputStream to 
the client.

Well, what do you think? Is the solution too dirty?

Greets,

Nils Kaiser

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