I have two domains one is example.com
and the second in mydomain.com
both domain is hosted in same ip address. I have a feature like add to cart in the website and it is stored in session. When i store values in session in example.com
and i got to the mydomain.com
the session not getting in mydomain.com
domain. Here the problem is domain name is different but both the domain loading the same content or same ip. On close looking i can find the jsessionid
generated for the different domain are different. So my question is, is there any way to share the session between two domain? Is this issue will be fixed by making the jsessionid
same for both domain? I have implemented my project in struts framework in java.
Asked
Active
Viewed 1,698 times
3

Aleksandr M
- 24,264
- 12
- 69
- 143

anoop
- 1,604
- 6
- 24
- 50
-
1The session is stored in a cookie. So according to http://stackoverflow.com/questions/6908002/sharing-cookies-across-domains-on-same-host you cannot use the same cookie. http://stackoverflow.com/questions/8406719/cookies-set-across-multiple-domains indicates that you might be able to use JavaScript to synchronize cookies between domains. – MvG Oct 17 '12 at 15:01
-
Yes i got the solution on same way.. – anoop Nov 19 '12 at 06:00