cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Man <Martin....@seznam.cz>
Subject Re: [c2] simple question on map:redirect-to semantics
Date Sat, 19 May 2001 08:10:36 GMT
On Fri, May 18, 2001 at 02:15:48PM -0400, Donald Ball wrote:
> On Fri, 18 May 2001, giacomo wrote:
> 
> > > > Have you tried using
> > > >
> > > >  <map:match pattern="foo/bar">
> > > >    <map:redirect-to uri="../bat"/>
> > > >  </map:match>
> > >
> > > sure, and that works, but i think it's ugly and hard to maintain if you
> > > deal with deeply structured patterns. e.g. if i move foo/bar to
> > > resources/foo/bar, i also have to change the redirect uri.
> >
> > Well, can you imagine what Stefano would say about that? Better plan you
> > URI space!
> 
> and i'm also sure that he'd recommend having a webapp-mount-point
> independent way of writing webapp-absolute urls!
> 
> <map:match pattern="foo/bar/bat/cat/dog">
>   <map:redirect-to uri="../../../../bat"/>
> </map:match>
> 
> is much harder to parse (for people anyway) and maintain than
> 
> <map:match pattern="foo/bar/bat/cat/dog">
>   <map:redirect-to uri="context://bat"/>
> </map:match>

I'm +10 of allowing context-relative redirects, I think we all agreed upon it
in the former "redirect" discussion but then it silently stopped. Right now we
have redirects that comply with servlet-specs, but I'm sure we need
context-relative redirects also (perhaps we can turn it around and make the
context ones by default and absolute ones per explicit request???)

really ugly example follows, like more the one with context://

<map:redirect-to uri="/under/context"/>
<map:redirect-to uti="/another_webapp" absoulte=yes"/>

as donald said: it allows you to write portable and context-independent webapps.
right now I have several webapps that make a use of absolute redirect and it
IS really nasty hack and no it DOES not have anything to do with URI space
planning ;-|

> 
> - doanld
> 
> 

just my opinion,
martin

-- 
-------------------------------------------------------------------------------
"Only dead fish swims with a stream"
gpg_key_available: http://globales.cz/~mman/martin.man.gpg
gpg_key_fingerprint: 2CC0 4AF6 92DA 5CBF 5F09  7BCB 6202 7024 6E06 0223

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


Mime
View raw message