Hi all,
The issue has been solved by setting the path of the cookie to "/".
Regards,
Arnab Jena
Assistant Systems Engineer
Tata Consultancy Services Limited
Bangalore,Karnataka
India
Cell:- 09886327580
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
| Arnab Jena/BLR/TCS
04/20/2006 11:18 AM |
|
Hi all,
I am working on cookie implementation and I am able to set and get the values from a cookie.
But I am stuck as because whenever the link changes in the site it actually creates a different cookie or searches from a different cookie.txt.
e.g I am in 'home' link and I moved to 'home2' link.so it is actually searching for the cookie.txt in the name 'home2.txt'.
Is it bcoz I have not set the path or something else.If it is related to path suggest me how to get only one cookie.txt for the whole site.
function1:
var language_cookie = cocoon.response.createCookie("languageCookie","en");
language_cookie.maxAge = 500;
cocoon.response.addCookie(language_cookie);
var country_cookie = cocoon.response.createCookie("countryCookie","India");
country_cookie.maxAge = 500;
cocoon.response.addCookie(country_cookie);
var target_group = cocoon.response.createCookie("targetGroup","PP");
target_group.maxAge = 500;
cocoon.response.addCookie(target_group);
function 2:
var cookies = cocoon.request.getCookies();
cocoon.session.setAttribute("nameLanguage",cookies[0].getValue());
cocoon.session.setAttribute("nameCountry",cookies[1].getValue());
cocoon.session.setAttribute("nameTargetGroup",cookies[2].getValue());
this is the part where it is failng.
Arnab Jena
Assistant Systems Engineer
Tata Consultancy Services Limited
Bangalore,Karnataka
India
Cell:- 09886327580
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
ForwardSourceID:NT00008C66
ForwardSourceID:NT00008C7A
| 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 |
