cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Messing, Elad" <elad.mess...@eml-d.villa-bosch.de>
Subject AW: Inconsistent behavior of session handling
Date Mon, 11 Jul 2005 08:34:54 GMT
Thank you Reinhard ! Words perfect now :)

Is it documented somewhere  ? 
Should I expect a change soon, so that I will have to change everything back to coccon.session.blah
? 

Thanks!
Elad

-----Urspr√ľngliche Nachricht-----
Von: Reinhard Poetz [mailto:reinhard@apache.org] 
Gesendet: Samstag, 9. Juli 2005 07:28
An: dev@cocoon.apache.org
Betreff: Re: Inconsistent behavior of session handling

Messing, Elad wrote:
> Hello all
> 	I have encountered an inconsistent behavior of cocoon in relation to 
> session handling.
> 	First I had this in my sitemap :
> 
>       <map:match pattern="session">
>         <map:act type="session">
>           <map:parameter name="action" value="create"/>
>         </map:act>
>         <map:call function="testSession"/>
>       </map:match>
>       <map:match pattern="session.html">
>         <map:generate type="jx" src="content/session.html"/>
>         <map:serialize/>
>       </map:match>
> 	
> 	testSession:
> 
> 	function testSession(){
> 		cocoon.sendPage("session.html");
> 	}
> 
> 	and in session.html I used JX to print the some session
> information:
> 	${cocoon.session.getAttribute("elad")}
> 	${cocoon.session.creationTime}
> 
> 	Everything works fine.
> 
> 
> 	When I change the sitemap to :
>       <map:match pattern="session">
>         <map:act type="session">
>           <map:parameter name="action" value="create"/>
>         </map:act>
>         <map:generate type="jx" src="content/session.html"/>
>         <map:serialize/>
>       </map:match>
> 
> 	I get the session.html file empty.. Like the session is not there 
> anymore because I didn't go through flow script ??
> 
> 	Is this a bug ? Feature ?


I guess it's not a bug in Cocoon session handling but a problem with an inconsistency in the
not-refactored version of jx-template. your example should work fine with jx-template in trunk
but not with jx-template in 2.1. there you should try ${session.getAttribute("elad")} instead
of ${cocoon.session.getAttribute("elad")}.

HTH

-- 
Reinhard Pötz           Independent Consultant, Trainer & (IT)-Coach 

{Software Engineering, Open Source, Web Applications, Apache Cocoon}

                                        web(log): http://www.poetz.cc
--------------------------------------------------------------------


Mime
View raw message