如何在JSF中关闭浏览器上的会话使其无效 [英] How to invalidate the session on browser close in the JSF

查看:80
本文介绍了如何在JSF中关闭浏览器上的会话使其无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户关闭浏览器时,任何人都可以帮助我使会话无效.每当用户关闭浏览器时,会话都应该在JSF中自动失效.

Can any one help me in invalidating the session when the user is closing the browser. Whenever the user closes the browser the session should be automatically invalidated in the JSF.

谢谢.

推荐答案

下面的链接可能会有所帮助.

Links below might help.

  1. 浏览器窗口关闭事件,它使用jquery.
  2. 如何在JSF 2.0中使会话无效?
  3. .unload()
  1. Browser window close event this uses jquery.
  2. How to invalidate session in JSF 2.0?
  3. .unload() from Jquery Api

提示:我不知道这行得通,但是在捕获到浏览器关闭的事件中进行ajax调用并在JSF中使会话无效可能会为您解决问题.

Hint: I dont know this will work but making an ajax call in event captured for browser close and invalidating the session in JSF might do the trick for you.

这篇关于如何在JSF中关闭浏览器上的会话使其无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆