Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

JSF How to destroy user session on browser close

Posted on 2012-09-17
3
Medium Priority
?
2,797 Views
Last Modified: 2013-02-08
User is closing the browser instead on clicking on sign of. In this how to destroy user session?
Calling servletRequest.getSession().invalidate(); using javascript or using listener or using both?
0
Comment
Question by:skumar99
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
leakim971 earned 1000 total points
ID: 38406863
Use a timer.
The user end if there's no action of the user.

http://techieexchange.wordpress.com/2008/02/21/jsf-session-expired-timeout-solution/
0
 
LVL 2

Expert Comment

by:Elbassel
ID: 38408544
- You can make a listner by Javascript when the window is closed
- Make the listner call you JSF code and the JSF code executes: session.invalidate
Best Wishes
0
 
LVL 2

Expert Comment

by:Elbassel
ID: 38408545
- You can make a listner by Javascript when the window is closed
- Make the listner call you JSF code and the JSF code executes: session.invalidate
Best Wishes
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question