cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject C2.2 cocoon-session-fw
Date Sat, 10 May 2008 19:09:26 GMT
Hi,

my question about sessions was not very well formulated. It is of course 
clear how to store attributes in the session. It seems however that the 
session is lost as soon as one goes to or uses another block.

I have a block through which an user logs in. The authenticator takes 
from a date base the user's details. After a successful authentication, 
a few attributes are stored in the session object like 
cocoon.session.setAttribute("userName", username).

Subsequently, another block is employed to generate HTML, like

....
<map:transform type="servletService">
   <map:parameter name="service" value="servlet:ui:/html-service"/>
</map:transform>
....

In the sitemap of this other block, I have

...
<map:transform src="resource/internal/stylesheets/ui2html.xsl">
   <map:parameter name="userName" value="{session-attr:userName}" />
   ...
</map:transform>
...

The userName attribute should then be included in the HTML that is 
returned to the client (the response would contain a sentence like 
"Welcome back, Andre")

But this is not happening. What is wrong with this scenario?

Thanks,

-- 
Andre H. Juffer              | Email: Andre.Juffer@oulu.fi
The Biocenter and            | WWW: www.biochem.oulu.fi/Biocomputing/
     the Dep. of Biochemistry | Fax: +358-8-553-1141
University of Oulu, Finland  | Phone: +358-8-553 1161
Triacle Biocomputing         | WWW: www.triacle-bc.com

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


Mime
View raw message