You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ar...@tcs.com on 2006/03/20 08:34:22 UTC

Setting session values in flowscripts while using it in sitemap

Hi All,


        I am doing a session implementation using cocoon,DASL.
I am stating whatever steps taken by me : 

I have set a value in session using flowscript function as soon as a page 
loads.

var user_group_cookie = 
cocoon.response.createCookie("nameCookie","group1");
        user_group_cookie.maxAge = 500;
        cocoon.response.addCookie(user_group_cookie);
var user_group_session = 
cocoon.session.setAttribute("nameSession",user_group_cookie);

I am trying to retrieve the values in the sitemap at some stage and make a 
call to to another flowscript function.

var session_value=cocoon.session.getAttribute("nameSession");

But unfortunately the values are not getting retrieved from session.
If I am trying to set the values to the session and then retrieve them 
from the session in the same function then the stuff is working fine.

var user_group_cookie = 
cocoon.response.createCookie("nameCookie","group1");
        user_group_cookie.maxAge = 500;
        cocoon.response.addCookie(user_group_cookie);
var user_group_session = 
cocoon.session.setAttribute("nameSession",user_group_cookie);
var session_value=cocoon.session.getAttribute("nameSession");

Any suggestions regarding the issue will be appriciated.

Regards,

Arnab Jena
Assistant Systems Engineer
Tata Consultancy Services Limited
Bangalore,Karnataka
India
Mailto: arnab.jena@tcs.com
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you