This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 12675
    
    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


Java Resources at www.wbrogden.com
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
 
Similar Threads
multiple chats
Opening a new Browser: How?
create new session in jsp
Firefox session reuse causing problems with backing beans
Session Management