cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Taffelt" <>
Subject Re: Permanently redirect from flow
Date Thu, 18 Dec 2003 17:46:55 GMT
> I have no problem with this. Can you suggest how you would do it? Have
> you looked into the code to see how it could be implemented?

the connection between flow and cocoon is

/************* original snippet ********************/
public void jsFunction_redirectTo(String uri) throws Exception {
 // Cannot use environment directly as TreeProcessor uses own version of
 // environment.redirect(false, uri);
 PipelinesNode.getRedirector(environment).redirect(false, uri);

adding a new function add permanent to the flow layer

/************* new code ***********************
public void jsFunction_redirectTo(boolean permant, String uri)
  throws Exception {
  if (permant)
    PipelinesNode.getRedirector(environment).globalRedirect(false, uri);
    // the old way

this enhancement should not break any existing code.

the usage from flow would be:

// the old style redirect as ever -> HTTP 302

// using the new redirect routine -> HTTP 301


View raw message