By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

accessing cookies across different domain.

P: n/a
Hello,
I have a application hosted on tomcat.
I use a jsp to set a cookie say channelid.
Now I am redirecting this page to some other appliaction which is
hosted in tomcat on some other machine.
I am having problems in accessing the cookie. The second
application in which i am supposed to get the cookie is getting null.
Let me know if someone has any idea.

Thanks in advance.

Oct 5 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
mi******@gmail.com said the following on 10/5/2005 7:19 AM:
Hello,
I have a application hosted on tomcat.
I use a jsp to set a cookie say channelid.
Now I am redirecting this page to some other appliaction which is
hosted in tomcat on some other machine.
I am having problems in accessing the cookie. The second
application in which i am supposed to get the cookie is getting null.
Let me know if someone has any idea.


You have run into the same-origin policy. If the cookie is set by one
domain it can not be retrieved from a different domain. If it could do
it in your case, it would be able to retrieve cookies that say, your
bank, saves on your computer. Big security risk.

If you are simply passing information from one site to the other, let
the server handle the information passing.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Oct 5 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.