cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [C2]: ToDo - List for going Beta
Date Thu, 12 Apr 2001 13:08:46 GMT


giacomo a écrit :
> 
<snip/> 
> 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.
> 
<snip/>
-- 
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


Mime
View raw message