You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2004/03/10 16:20:39 UTC

[Vote] Change internal redirect handling

As discussed recently, our internal redirects don't work 
the way one would usually suspect. If you do an internal
redirect, like:

<map:redirect-to uri="cocoon://some-pipeline"/>

and the called pipeline has an error, then the error handler
of the calling pipeline (containing the redirect) is called
and not the error handler of the called pipeline.
So, the above line is not the same as:

<map:redirect-to uri="some-pipeline"/>

So, we have three choices to change this:

a) Make an internal redirect a real forward (This is an
   incompatible change)

b) Make it configurable on the uri, like
<map:redirect-to uri="cocoon://some-pipeline?cocoon:forward=true"/>

c) Make it configurable on the map:redirect, like
<map:redirect-to uri="cocoon://some-pipeline" forward="true"/>

For solutions b) and c) we can discuss the correct syntax later on,
let's for now focus on the way we want to have it.

Although this is an incompatible change, I prefer a) as it is
imho the right way of doing the redirect.

Please cast your votes for either a), b) or c)

Carsten 

Carsten Ziegeler 
Open Source Group, S&N AG
http://www.osoco.net/weblogs/rael/


Re: [Vote] Change internal redirect handling

Posted by Joerg Heinicke <jo...@gmx.de>.
On 10.03.2004 16:20, Carsten Ziegeler wrote:

> a) Make an internal redirect a real forward (This is an
>    incompatible change)

+1 This is indeed what I expect!

Joerg

Re: [Vote] Change internal redirect handling

Posted by Unico Hommes <un...@hippo.nl>.

Sylvain Wallez wrote:

> Carsten Ziegeler wrote:
> 
>> As discussed recently, our internal redirects don't work the way one 
>> would usually suspect. If you do an internal
>> redirect, like:
>>
>> <map:redirect-to uri="cocoon://some-pipeline"/>
>>
>> and the called pipeline has an error, then the error handler
>> of the calling pipeline (containing the redirect) is called
>> and not the error handler of the called pipeline.
>> So, the above line is not the same as:
>>
>> <map:redirect-to uri="some-pipeline"/>
>>
>> So, we have three choices to change this:
>>
>> a) Make an internal redirect a real forward (This is an
>>   incompatible change)
>>
>> b) Make it configurable on the uri, like
>> <map:redirect-to uri="cocoon://some-pipeline?cocoon:forward=true"/>
>>
>> c) Make it configurable on the map:redirect, like
>> <map:redirect-to uri="cocoon://some-pipeline" forward="true"/>
>>
>> For solutions b) and c) we can discuss the correct syntax later on,
>> let's for now focus on the way we want to have it.
>>
>> Although this is an incompatible change, I prefer a) as it is
>> imho the right way of doing the redirect.
>>
>> Please cast your votes for either a), b) or c)
>>  
>>
> 
> +1 for (a) and therefore -1 for (b) and (c).
> 
> However, as discussed, a "cocoon:handle-errors=true|false" parameter is 
> useful for use with the SourceResolver.
> 

+1 for a) and +1 for a special parameter.

--
Unico

Re: [Vote] Change internal redirect handling

Posted by Sylvain Wallez <sy...@apache.org>.
Vadim Gritsenko wrote:

<snip/>

>
> Why (a), (b), or (c) ? There is always option of (d):
>
> d) Make it configurable on handle-errors element of the called 
> pipeline. This way, behavior of redirect-to does not need to be 
> changed, and this feature is more useful in general - especially in 
> "portlets". Or is this feature will be subject of next vote? :)


Exactly. Making it configurable on <map:handle-errors> has been 
discussed, and both are necessary, as the error handling strategy has to 
be defined by the caller or the callee depending on the usage context. 
This vote is about specifying the behaviour of internal redirects, 
because it may change the current behaviour and can therefore cause 
minor back-imcompatibilities.

Configuration of <handle-errors>, as it's a new feature, will be voted 
separately ;-)

Sylvain

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


RE: [Vote] Change internal redirect handling

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Vadim Gritsenko wrote:
> >>
> >> So, we have three choices to change this:
> >>
> >> a) Make an internal redirect a real forward (This is an
> >>   incompatible change)
> >>
> >> b) Make it configurable on the uri, like <map:redirect-to 
> >> uri="cocoon://some-pipeline?cocoon:forward=true"/>
> >>
> >> c) Make it configurable on the map:redirect, like <map:redirect-to 
> >> uri="cocoon://some-pipeline" forward="true"/>
> >>
> >> For solutions b) and c) we can discuss the correct syntax 
> later on, 
> >> let's for now focus on the way we want to have it.
> >>
> >> Although this is an incompatible change, I prefer a) as it is imho 
> >> the right way of doing the redirect.
> >>
> >> Please cast your votes for either a), b) or c)
> >
> >
> > +1 for (a) and therefore -1 for (b) and (c).
> >
> > However, as discussed, a "cocoon:handle-errors=true|false" 
> parameter 
> > is useful for use with the SourceResolver.
> 
> 
> Why (a), (b), or (c) ? There is always option of (d):
> 
> d) Make it configurable on handle-errors element of the 
> called pipeline. 
> This way, behavior of redirect-to does not need to be 
> changed, and this feature is more useful in general - 
> especially in "portlets". Or is this feature will be subject 
> of next vote? :)
> 
Yes, exactly :) This is just about redirects - nothing else!
Of course there are more options, we could also do:

e) Use a new sitemap element, like
<map:forward uri="cocoon://something"/>

> I'm +1 for (d), +0 for (a), -0.5 for (b) and (c).
> 

Carsten


Re: [Vote] Change internal redirect handling

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Sylvain Wallez wrote:

> Carsten Ziegeler wrote:
>
>> As discussed recently, our internal redirects don't work the way one 
>> would usually suspect. If you do an internal
>> redirect, like:
>>
>> <map:redirect-to uri="cocoon://some-pipeline"/>
>>
>> and the called pipeline has an error, then the error handler
>> of the calling pipeline (containing the redirect) is called
>> and not the error handler of the called pipeline.
>> So, the above line is not the same as:
>>
>> <map:redirect-to uri="some-pipeline"/>
>>
>> So, we have three choices to change this:
>>
>> a) Make an internal redirect a real forward (This is an
>>   incompatible change)
>>
>> b) Make it configurable on the uri, like
>> <map:redirect-to uri="cocoon://some-pipeline?cocoon:forward=true"/>
>>
>> c) Make it configurable on the map:redirect, like
>> <map:redirect-to uri="cocoon://some-pipeline" forward="true"/>
>>
>> For solutions b) and c) we can discuss the correct syntax later on,
>> let's for now focus on the way we want to have it.
>>
>> Although this is an incompatible change, I prefer a) as it is
>> imho the right way of doing the redirect.
>>
>> Please cast your votes for either a), b) or c) 
>
>
> +1 for (a) and therefore -1 for (b) and (c).
>
> However, as discussed, a "cocoon:handle-errors=true|false" parameter 
> is useful for use with the SourceResolver.


Why (a), (b), or (c) ? There is always option of (d):

d) Make it configurable on handle-errors element of the called pipeline. 
This way, behavior of redirect-to does not need to be changed, and this 
feature is more useful in general - especially in "portlets". Or is this 
feature will be subject of next vote? :)

I'm +1 for (d), +0 for (a), -0.5 for (b) and (c).


Vadim



Re: [Vote] Change internal redirect handling

Posted by Sylvain Wallez <sy...@apache.org>.
Carsten Ziegeler wrote:

>As discussed recently, our internal redirects don't work 
>the way one would usually suspect. If you do an internal
>redirect, like:
>
><map:redirect-to uri="cocoon://some-pipeline"/>
>
>and the called pipeline has an error, then the error handler
>of the calling pipeline (containing the redirect) is called
>and not the error handler of the called pipeline.
>So, the above line is not the same as:
>
><map:redirect-to uri="some-pipeline"/>
>
>So, we have three choices to change this:
>
>a) Make an internal redirect a real forward (This is an
>   incompatible change)
>
>b) Make it configurable on the uri, like
><map:redirect-to uri="cocoon://some-pipeline?cocoon:forward=true"/>
>
>c) Make it configurable on the map:redirect, like
><map:redirect-to uri="cocoon://some-pipeline" forward="true"/>
>
>For solutions b) and c) we can discuss the correct syntax later on,
>let's for now focus on the way we want to have it.
>
>Although this is an incompatible change, I prefer a) as it is
>imho the right way of doing the redirect.
>
>Please cast your votes for either a), b) or c)
>  
>

+1 for (a) and therefore -1 for (b) and (c).

However, as discussed, a "cocoon:handle-errors=true|false" parameter is 
useful for use with the SourceResolver.

Sylvain

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