• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create new session in jsp

 
TD Bartos
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there anyway to create/spawn a new session from my jsp page?

i'm using javascript: window.open(target, name, attributes) to create a new window, and i need this window to be in a different session.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34198
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by TD Bartos:
is there anyway to create/spawn a new session from my jsp page?

No. This behavior is very browser dependent. In particular, Netscape considers all windows spawned from the same window to be part of the same session.

What are you trying to accomplish? Maybe there is another way.
 
TD Bartos
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a main window and a pop-up window using a session javabean containing all of my database connection info. the new feature i'm trying to add would allow: from this pop-up window some words displayed in the text to be hoppable or links of some sort - and the action in this link would be to retrieve different information from the same or a different database. this third popup window is basically another instance of the first window but possibly connected to a different database. if this remains in the same session - then i've hosed up my session connection information in the first window. if i cannabolize the first window rather than creating a third window, then the user's trail or previous results have been lost.
the current business requirement for this feature calls for a new window to be spawned - unless i push back and tell them they can't accomplish what they really want to do.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64715
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you feel that you need separate sessions in order to handle communications with more than one database?
 
TD Bartos
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i already have a whole web application developed around using session scoped javabeans -- for example the biggest is a "DatabaseInfoBean" which maintains server and connection info for the database and a gazillion different configuration items for the database (this isn't your average jdbc connection, but my company's database format). but the pages also already use a "navigationBean", a "preferencesBean", a "storedQueryBean" etc etc etc.
the contents of this third window should operate the same as the first window - but window 1 and 3 can't be allowed to trip all over each other. if they were in different sessions, then they would each have their own set of javaBeans.
 
Yuriy Zilbergleyt
Ranch Hand
Posts: 429
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know, it's impossible to have two sessions open from the same browser instance. Seems like you might have to rename the beans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic