Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to open another window without using the same session?

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I open another window without using the same session as the one which is already open? In other word, how can I assoziate different Sessions to the different windows from the same browser instance?
thanks,
Sam
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if you can have two sessions or not, but you could probably fake it. In the session object, place a collections item like a HashMap. On the first page, whatever information you need to store, put in a Vector or something and then put that vector in the HashMap as "page1"
Now when you are on the second page, look for something in the session called "page2". if it doesn't exist, then you can create a new Vector to store information related to this page and put this in the HashMap as "page2"
Now whenever you need to access "session #1" variables, get the Vector out of the hashmap for page1. the same for page two.
Hope that helps
Brian
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian, it helped me to solve the problem.
Sam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic