You could do this from flowscript. Basically what you'd need to do is process the request in the flow layer and use the cocoon object's processPipelineTo() method to retrieve the output of the pipeline and redirect from there.
<map:match pattern="myPattern"> <map:call function="processLinks"/> </map:match>
function processLinks() { var uri = cocoon.request.getParameter("Quelle"); var output = new Packages.java.io.ByteArrayOutputStream(); cocoon.processPipelineTo(uri, output); var redirectUri = output.toString(); cocoon.redirectTo(redirectUri); }
HTH Adam
I've followed your proposal and now I'm getting this error message:
-------------------------------------- An Error Occurred
at processLinks (file:/path/to/script/redirect.flow, Line 4): expected a java.io.OutputStream instead of null
org.apache.avalon.framework.CascadingRuntimeException: "file:/path/to/script/redirect.flow", line 4: uncaught JavaScript exception: at processLinks (file:/path/to/script/redirect.flow, Line 4): expected a java.io.OutputStream instead of null
cause: org.mozilla.javascript.JavaScriptException: at processLinks (file:/path/to/script/redirect.flow, Line 4): expected a java.io.OutputStream instead of null
--------------------------------------
Obviously the function "processPipelineTo" is missing one of three arguments. I'm completely new to flowscripts and I'd like to learn how to solve this.
How do I get the missing argument?
And where can I put the xpath expression extracting the URL from the webpage fetched by "request.getParameter"?
-- [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
