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: Allow redirects inside error handling
Date Wed, 30 Apr 2003 07:48:53 GMT
Nicola Ken Barozzi wrote:

> Björn Lütkemeier wrote, On 30/04/2003 8.08:
>
>> Hi,
>>
>>> -----Original Message-----
>>> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org]
>>> Sent: Tuesday, April 29, 2003 6:38 PM
>>> To: cocoon-dev@xml.apache.org
>>> Subject: Re: Allow redirects inside error handling
>>>
>>> Björn Lütkemeier wrote, On 29/04/2003 16.42:
>>> ...
>>>
>>>> Sorry, but I did not find any convincing argument in the discussion 
>>>> why
>>>> redirects should be impossible.
>>>
>>>
>>> Tell me why you need them, maybe I can understand.
>>
>>
>> It's quite simple to explain. We have a customer, that has to do the
>> following within his web application:
>>
>> <map:pipeline>
>
<snip/>

>>
>>     </map:match>
>> </map:pipeline>
>
>
> Ok, this does the same without redirects *except* in the
>
>  <map:when test="validationFailed">... <!-- redisplay form -->
>
> part. This is wrong, because handle-errors in *not* to be used for 
> programming logic. This shows it clearly that we cannot allow 
> redirects in there, because the first thing that happens is misuse.
>
> Sylvain, please revert the change. 


I also consider using error-handler that way to be bad design : handling 
invalid form submission is part of the nominal behaviour of the 
application, and therefore should be handled in the sitemap (actually in 
the form-validation action).

But I also consider Geoff's use case to be fully valid : if something 
goes wrong, do the minimal that we can expect to work correctly which is 
redirect to another server (e.g. an httpd) that will deliver the error page.

Furthermore, I never understood the link between allowing generators in 
handle-errors and forbidding redirects, as having an implicit generator 
doesn't prevent redirecting.

So I will call for a vote on this issue (see next post).

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Mime
View raw message