cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: Standardizing Redirect in Cocoon
Date Fri, 13 Apr 2001 18:05:21 GMT
giacomo wrote:
> 
> On Fri, 13 Apr 2001, Berin Loritsch wrote:
> 
> > As of Servlet 2.3, the spec officially states that redirects to "/"
> > get sent to the server root.  I can think of many cases where an easy
> > redirect to the context root is important.
> >
> > To that end, I propose that the redirect() method should be wrapped,
> 
> Which redirect() method? The one of the Environment object?

The one that a developer of Cocoon can use.  Perhaps both.  Actually,
since all developers are using the Cocoon wrapped objects, we can have
the Environment one call the Request object, which handles all the real
logic.

> > and if the "context:" protocol is specified, then the URL should be
> > relative to the context root.  This should be easy in Cocoon 2, because
> > we are limiting the access to the redirect function--I don't know about
> > Cocoon 1.
> 
> Can you explain a bit in detail?

Basically something like this:

Current URI:     "http://localhost/cocoon/foo/bar/index.html"
Current context: "cocoon"

CURRENTLY DONE BY SERVLET API
Redirect-to: "/index.html"      maps to "http://localhost/index.html"
Redirect-to: "../index.html"    maps to "http://localhost/cocoon/foo/index.html"

NEW FUNCTIONALITY
Redirect-to: "context://index.html" maps to "http://localhost/cocoon/index.html"

If the context is moved to "margaritaville/parrothead"
then the context urls won't have to be changed
("http://localhost/margaritaville/parrothead/index.html")
to go to the new location.

Absolute urls like "/cocoon/index.html" won't work in that case, they
would have to be changed in the code.

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