Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can two web applications access same session object?

 
sarang bharambe
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,

I found following question in one of the mocks:

You have implemented two different online shopping applications deployed as two separate web applications. You have stored a shopping cart object of the same class type in the session object of each application to track which products a customer has selected.
Given the scenerio, how would you retrieve the session object that is associated with a customer from both web applications so that the same shopping cart object can be shared between the two applications?

So the first question that came to mind is Can two web applications have access to same session object?

can anybody throw light on this?

Thanks in advance.
regards,
sarang bharambe
 
vidya sagar
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI sarang

To my Knowledge there is no way to share same session object between two different web applications.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

According to Servlet specs there is no way to do this. But in large application it is possible through EJBs, SSL sessions, by storing session information in database. But the same session object can not share.

Thanks
[ July 17, 2006: Message edited by: Narendra Dhande ]
 
sarang bharambe
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the answer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic