wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlet session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet session" Watch "Servlet session" New topic
Author

Servlet session

dluckose
Greenhorn

Joined: Jul 31, 2001
Posts: 6
If i open a new window from the current browser window, both window is part of the same session. How can I assign a new session to the new window, keeping the session for the current (first) window same?
Please answer...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
I don't think you can since session is typically based on cookies. However you can distinguish between the windows by writing hidden variables in forms.
Bill
Jeff Sunder
Ranch Hand

Joined: Jun 26, 2001
Posts: 47
When the new browser is opened, you can invalidate the exisitng session and then create a new one. You can create a new session by calling request.getSession
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
Hi,
Jeff I�ve never done this but I think if you invalidate the session from the other window you�ll gonna loose the session in the first one as well don�t you?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet session