cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: [C2]: ToDo - List for going Beta
Date Thu, 12 Apr 2001 14:08:29 GMT


On Thu, 12 Apr 2001, Sylvain Wallez wrote:

>
>
> 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).

Well, to be honest there are too many whens and ifs. Even if Tomcat if
fully buffering the output (which is a bad thing IMO).

> 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...

I know and understand that rerdirect in C1 in a used pattern (because
there is no choice) but I really would like to keep C2 without that
functionality to keep the clean model we have but will help with
guidelines and support on how to migrate to C2 instead.

Giacomo

>
> > 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
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message