cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerritjan Koekkoek <>
Subject Session handling without cookies
Date Sun, 22 Jan 2006 20:22:12 GMT

A statement from the cocoon userguide ( 
There are two methods for session tracking: cookies and url rewriting.

Cookies is giving to much headaches on Tomcat 5.0, with proxy.
I would like to know how to do it with url rewriting.

 From the same userguide it states:
URL rewriting instead is a little bit complicated. For url rewriting,  
each link the user can select, needs a special session ID appended to  
this link. Unfortunately, this is not done automatically by Cocoon or  
the servlet engine. You can either do this by hand or you can use the  
encodeURL transformer just before the html serializer.

My protected pipeline looks like:
       <map:match pattern="*_alleen_voor_leden_*.html">
         <map:act type="auth-protect">
           <map:parameter name="handler" value="alleen_voor_leden"/>
           <map:match pattern="*_alleen_voor_leden_*.html">
             <map:aggregate element="page">
               <map:part src="cocoon:/header_artikel_{1}.xml"/>
               <map:part src="cocoon:/index_artikel_{1}.xml"/>
               <map:part src="cocoon:/content_{2}.xml"/>
             <map:transform src="style/xsl/content_artikel2html.xsl"/>

De login pipe looks like:
       <map:match pattern="cdls_login">
         <map:act type="auth-login">
           <map:parameter name="handler" value="alleen_voor_leden"/>
           <map:parameter name="parameter_user_id" value="{request- 
           <map:parameter name="parameter_password" value="{request- 
           <map:redirect-to uri="/service_submenu_kinderen.html"/>
         <!-- failed: -->
         <map:redirect-to uri="aanmeldfout.html"/>

The authentication looks like:
           <handler name="alleen_voor_leden">
             <redirect-to uri="/aanmeldfout.html"/>
             <authentication uri="cocoon:raw:/cdls_authenticate"/>

And the..
       <!-- This is the authentication resource -->
       <map:match pattern="cdls_authenticate">
         <map:generate src="authentication/userlist_cdls-nl.xml"/>
         <map:transform src="authentication/authenticate.xsl">
           <map:parameter name="use-request-parameters" value="true"/>
         <map:serialize type="xml"/>
looks like this.

Where and how do I put in url rewriting?

Gerritjan Koekkoek
Oudervereniging Cornelia de Lange syndroom

View raw message