• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Browser cookie session doesn�t get deleted

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web application which uses user browser cookie to perform Single-Sign-On after user�s login to the system. I�m experiencing a problem lately that user session stays with old user even after he do a logout or close the browser. I remember that if the expiry is not set the cookie stays only till the life of the browser, right? I�m using http Cookie class to set the cookie token and cookie name/value.

The problem solves when the users manually got to IE option and delete the cookies and temp files. Then if he login it works fine.

Is there a way to get around this problem? We experience this happening not with all users, but with some of them (most of XP users). Is there a specific thing need to be done on my JSP or some configuration to be set on end-user�s machine? We cant say each users of same machine to go each time to go to IE options and do the clear process. Please advice. Any input on this is appreciated.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try Cookie.setMaxAge() with a negative value ?
 
Karan Sinha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Satou,

But by default the value is -1 right? Do you think this is the problem? Since this problem is not faced by all users, i suspect what might be the cause of this behaviour?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But by default the value is -1 right?


Oh, that's right.

Do you have access to the machine of those users ?
You could check the lifetime of the cookie to make sure it is set to "end of session". (with Firefox's Cookie window for example)

By the way, those users all use the same browser ?
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic