• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to open another window without using the same session?

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Brian, it helped me to solve the problem.
Sam
 
reply
    Bookmark Topic Watch Topic
  • New Topic