cocoon-users mailing list archives

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

A statement from the cocoon userguide (http://cocoon.apache.org/2.1/ 
developing/webapps/session.html)
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:aggregate>
             <map:transform src="style/xsl/content_artikel2html.xsl"/>
             <map:serialize/>
           </map:match>
         </map:act>
       </map:match>

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- 
param:username}"/>
           <map:parameter name="parameter_password" value="{request- 
param:wachtwoord}"/>
           <map:redirect-to uri="/service_submenu_kinderen.html"/>
         </map:act>
         <!-- failed: -->
         <map:redirect-to uri="aanmeldfout.html"/>
       </map:match>

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

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:transform>
         <map:serialize type="xml"/>
       </map:match>
looks like this.

Where and how do I put in url rewriting?

Gerritjan Koekkoek
Oudervereniging Cornelia de Lange syndroom
www.cdls-nl.org


Mime
View raw message