Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "session problems" Watch "session problems" New topic

session problems

Michael Downs

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

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 ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Michael Downs

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

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
I agree. Here's the link:
subject: session problems
It's not a secret anymore!