Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 4968 invoked from network); 18 Dec 2003 17:46:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 18 Dec 2003 17:46:54 -0000 Received: (qmail 2492 invoked by uid 500); 18 Dec 2003 17:46:43 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 2436 invoked by uid 500); 18 Dec 2003 17:46:42 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 2423 invoked from network); 18 Dec 2003 17:46:42 -0000 Received: from unknown (HELO chuck.interface-business.de) (193.101.57.34) by daedalus.apache.org with SMTP; 18 Dec 2003 17:46:42 -0000 Received: from borstel (borstel.interface-business.de [193.101.57.39]) by chuck.interface-business.de (8.12.9/8.12.9) with SMTP id hBIHkicb017596 for ; Thu, 18 Dec 2003 18:46:44 +0100 (CET) (envelope-from frank.taffelt@interface-business.de) Message-ID: <044c01c3c58e$edaa1340$273965c1@ifb.interfacebusiness.de> From: "Frank Taffelt" To: References: <03e701c3c4bb$d8f21ca0$273965c1@ifb.interfacebusiness.de> <3FE087E8.3070002@upaya.co.uk> Subject: Re: Permanently redirect from flow Date: Thu, 18 Dec 2003 18:46:55 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > 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 \src\java\org\apache\cocoon\components\flow\javascript\fom\FOM_Cocoon.java: /************* original snippet ********************/ public void jsFunction_redirectTo(String uri) throws Exception { // Cannot use environment directly as TreeProcessor uses own version of redirector // 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); else // the old way jsFunction_redirectTo(uri); } this enhancement should not break any existing code. the usage from flow would be: // the old style redirect as ever -> HTTP 302 cocoon.redirectTo('abc'); // using the new redirect routine -> HTTP 301 cocoon.redirectTo(true,'abc'); Frank