cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject [Vote]: URL Rewriting was:[RT]: Session support
Date Tue, 09 Oct 2001 07:59:25 GMT
Hi Team,

I guess, you all saw the recent thread about session support.

I would like to add a new interface URLRewriter (name can be changed!)

interface URLRewriter {
     boolean isURLRewritingEnabled();
     String  rewriteURL(String url);
}

This object is responsible for rewriting urls for session handling.
In fact (if Cocoon is used as a servlet), the isURLRewritingEnabled
returns only true if a session is available and the session is not
determined by Cookies. The rewriteURL() is forwarded to the
Response object.

The SitemapOutputComponent interface should be extended by:
- setURLRewriter(URLRewriter ur);

A serializer *can* use this for url rewriting, e.g. the html
serializer.

This approach has only minimal changes to Cocoon and it would
enable automatic session handling while maintaining cacheability
of most responses (the serializer can check using isURLRewritingEnabled
and if this is false the response can still be cached without problems).

Such a change simplies writing web applications as you don't have
to take care about how session handling works. If you look at other
frameworks, e.g. WebObjects etc., they provide a similar solution.

The other working solution would be to writer a special transformer.
But you would need a transformer for each format supporting this (html,
wml etc) and the user must always use the transformer/serializer as a
pair. If he forgets it somewhere, the web applications is broken. I
think Cocoon can and should do this better!

So please let's vote about this and if we should include it in 2.0.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================



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


Mime
View raw message