Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 13122 invoked by uid 500); 12 Apr 2001 13:11:49 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 13108 invoked from network); 12 Apr 2001 13:11:48 -0000 Message-ID: <3AD5A8DE.28E8AE39@anyware-tech.com> Date: Thu, 12 Apr 2001 15:08:46 +0200 From: Sylvain Wallez Organization: Anyware Technologies X-Mailer: Mozilla 4.7 [fr] (WinNT; I) X-Accept-Language: fr,en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [C2]: ToDo - List for going Beta References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N giacomo a �crit : > > We have to take the following into acount for redirect: > > 1. If the pipeline has started to output characters onto the > OutputStream IIRC the servlet engine will throw an Exception > when issuing a redirect afterwards. There will be situation where you > *never* will be able to redirect because of this restriction (think > of a pipeline containing a XSP generator and an XMLSerializer which > almost immediately produce output on the OutputStream). > The OutputStream is buffered : according to servlet 2.2 Javadoc, calling HttpServletResponse.sendRedirect will throw an IllegalStateException "if the response has been commited", which means the buffer size has been exceeded and some data has been actually sent back to the client browser. The exact moment when this occurs depends of course on the buffer size (see ServletResponse javadoc). In our Cocoon 1 apps, the application code that issues redirects (after performing what would now be Actions) is at the very beginning of XSPs, so there's a high probability that the buffer will not be flushed when redirects occurs (IIRC, I even read once that Tomcat fully buffers the output). I know and agree that redirect in the pipeline is a bad thing, but we really would like to easily port our C1 apps to C2... > 2. If we allow redirects we then need a way to report that (probabbly by > an Exception) to the pipeline from a sitemap component that a > redirection has occurred to interrupt the resource production because > it will throw an Exception otherwise. > -- Sylvain Wallez Anyware Technologies - http://www.anyware-tech.com --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org