• Post Reply Bookmark Topic Watch Topic
  • New Topic

session over multiple domains  RSS feed

 
Daniil Sosonkin
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have this issue that I gotta solve somehow. My site is running on the hosting computer with many domains. And I have a shopping cart written in JSP based on sessions. So lets say I have a domain www.domain1.com and I create session on it and add items to it. But I want to do secure checkout and I can't use my domain as secure one since its a hosting, there is only one IP and thats the limitation of Apache/SSL. Thus, I must use https://www.myhosting.com/~domain1
The problem is how would I transfer a session to that domain? I hope I'm making making sense. JSP session won't be visible from another domain I guess.
Thanks,
D.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct, the session mechanism is supposed to be visible to only one "web application" at a time. You will have to come up with some other way of persisting the shopping cart data so that it is visible in other domains. Can you get access to a database on the host?
Bill
 
Daniil Sosonkin
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, there is a mySQL database.
I was thinking of passing a JSESSIONID cookie value to new site, but seems to be pointless as a session is per web site.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSESSIONID would not do any good since it would not lead to any session on any other server. You need some form for the data that can be stored in the SQL database - perhaps a serializable collection object of some sort that can be stored as a BLOB.
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!