cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Kaiser <NilsKai...@gmx.de>
Subject "Real" Pipeline Redirect
Date Mon, 27 Mar 2006 14:47:29 GMT
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


Mime
View raw message