This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes session problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "session problems" Watch "session problems" New topic
Author

session problems

Michael Downs
Greenhorn

Joined: Feb 03, 2004
Posts: 2
Java 1.3.1, WSAD 4.0, Iplanet, Netscape 7.+ If you open two browsers on the same PC and logon to a secured account with two seperate customers. Initially the data displayed will be unique to either customer, however if you refresh one customers view, the data that returns will be the same as the other customers. I believe it is session related, thoughts?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
It's cookie related, really.
There is nothing in the HTTP specification which says what should happen to cookies if two browser windows are opened to the same site from the same machine. And it's not obvious what they should do, either.
Some web applications pop up lots of windows on the assumption that they are all part of the same session, and need the session cookies to be the same. Some applications allow you to log on separately from separate windows, and might work better if each window used separate cookies. And what do you think should happen if the cookies have a long lifetime - long after the browser window that created them has closed?
The bottom line is that you should not depend on cookies for session handling if you need to do this. To make sure there is no possible confusion, you really need to use URL-rewriting for your session ids.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Michael Downs
Greenhorn

Joined: Feb 03, 2004
Posts: 2
Thank you, I'm going to research the cookie that we set
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

also, do a search in this forum for "session" and "netscape" -- you'll find a bunch of threads on this topic.
Also -- assuming IE still behaves the same, I believe you'll see the same behavior in IE if you use Ctrl+N to open a new IE window --- rather than starting a whole new IE instance by clicking on the icon. Basically -- windows opened with Ctrl+N use the same session context, whereas instances started seperatley have their own context.


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
 
GeeCON Prague 2014
 
subject: session problems