wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes create new session in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "create new session in jsp" Watch "create new session in jsp" New topic
Author

create new session in jsp

TD Bartos
Greenhorn

Joined: Mar 29, 2005
Posts: 9
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
TD Bartos
Greenhorn

Joined: Mar 29, 2005
Posts: 9
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

Joined: Jan 10, 2002
Posts: 60794
    
  65

Why do you feel that you need separate sessions in order to handle communications with more than one database?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
TD Bartos
Greenhorn

Joined: Mar 29, 2005
Posts: 9
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

Joined: Dec 13, 2004
Posts: 429
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create new session in jsp
 
Similar Threads
session lost with window.open()
please answer this question
please answer this question
create new session?
Session duplicated