Thread: Logout session

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    France
    Posts
    2
    Rep Power
    0

    Question Logout session


    How to logout a HttpSession
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    France
    Posts
    2
    Rep Power
    0

    Thumbs down It's not enought !!


    In fact, I need too to force the user to re-enter a sign.
    It's used when a user want to connect him with 2 differents login on the application.
    For IE users, no problems : open a nex browser window is enougth.
    But for Netscape user, the pb is tha the sign-on dialog box do not appear when you open a new browser window if it already exist a "signed" window !!!!

    Please help
  6. #4
  7. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    You're kinda stuck. If you can get the user to manually launch a new instance of the browser, you should be able to get away with it, but I don't think you'll be able to do it programatically. I'm actually really surprised the IE works. I've usually found that IE isn't very friendly when it comes to multiple session.

    One thing you might try is to pass the session ID as a parameter on the url, rather than as a cookie. I've never done it before with java, but I know php can do that (I assume java can too). That would mean you could tie a session to a specific window. The user could always copy the session id to a new window, but what are ya gonna do?
  8. #5
  9. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    Actually, IE is consistent in it's behavior of when it shares sessions and when it doesn't. If you spawn an IE window from an existing window, it will share all non-persistent cookies (of which the session cookie is). There are several ways a new window can be spawned from an existing window:

    1. The new window can be spawned by clicking a link or submitting a form with a "target" of "_blank" (or any target name that is not the current window).

    2. It can be opened using javascript's window.open().

    3. It can be opened using crtl-n.

    There are probably more. If a new window is opened any of these ways, then the spawned window will share all existing in-memory cookies with the 'parent' window.

    If you open a new IE by double clicking it's icon, then it will not share the in-memory cookies. It will start a brand new session.

    This can be tested if you are currently logged into devshed here. If you crtl-n a new window and look, that window will show you logged in. If you open a new IE using the icon and navigate to devshed, that window will not be logged in (it will show your name as "browsing the forum", but that window itself is not logged in).
  10. #6
  11. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Nemi,
    That's the behavior that I have observed, yes, but, it seems that vporcuna is getting some different results. Not sure why, though.

IMN logo majestic logo threadwatch logo seochat tools logo