Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to end a web application session.  RSS feed

 
Wal Samaad
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web application that authenticate users through the Sun GlassFish Server to an OpenDS Directory service. I have problems writing code structure that can log users out of the application and end their sessions. Each time i call a Session.Invalidate and i use the browser navigation button to go back, a session is created instanly and also the getUserprincipal is still available to the page. I know i have been doing something wrong and i am in need of help. thanks
 
Aman Goel
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do 1 thing.
Before going to any page ...you can check about session exists or not. If session has been invalidated already then you can redirect the user to home page. Other methods I will try..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!