You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by ju...@basf-it-services.com on 2003/04/23 14:18:54 UTC

redirects inside errorhandling

Hi,

currently it is explicitly prohibited in Cocoon to use <map:redirect-to>
-tags within error handlers. We considered the corresponding discussion
from July 2002 (see
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=102631324505981&w=2),
where it has been said, that redirects should not be done within error
handlers to avoid potential infinite loops. Nonetheless we propose to
remove this limitation from Cocoon for the following reasons:

1) Of cause there is the risk of infinite loops when using redirects in
error handlers. However such a situation would not be a fault of Cocoon,
but a defective configuration of the application's flow. So if one takes
care about not producing infinite loops, it may certainly be reasonable to
use redirects for specific use cases.

2) Only <map:redirect-to> tags are forbidden inside error handlers, but it
is easily possible to circumvent this by doing a redirect within some
action. Therefore if one needs to do a redirect, one can do it anyway, so
why not allow <map:redirect-to> in error handlers? If a user gets problems
with it, because of a defective application flow configuration, it is his
fault. So he will correct his configuration and everything works fine ;-)

Thoughts?

Regards, Jürgen and Björn.