cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <>
Subject Redirector
Date Thu, 06 Jan 2005 11:39:32 GMT
I've written a custom action like this:

public class RedirectorAction extends AbstractAction {

    public Map act( Redirector redirector, 
                    SourceResolver resolver, 
                    Map objectModel, 
                    String source, 
                    Parameters parameters ) {
        try {
            Request request = (Request)objectModel.get("request");
            String referrerURI = request.getParameter("referrerURI");
            redirector.redirect(false, referrerURI);

The reason I wrote this is because I have a pipeline which I want to
execute some db updates via the sqltransformer.  But then I want to
redirect that pipeline to another pipeline based on a hidden parameter
I've kept in a form.  The problem I'm having is that when this action
runs, the sqltransformer (which is above it in the pipeline) doesn't. 
It's like the redirector.redirect() method cancels everything that was
happening.  I noticed this because when I use a view which exits the
pipeline right before this action, it works fine.  Is there a way to
get around this?  I want to issue a redirect to the client, but
process the pipeline as normal on the serverside.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message