会话超时后允许用户登录JSF 2.0 [英] Allow user to login after session times out JSF 2.0

查看:122
本文介绍了会话超时后允许用户登录JSF 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要求是允许用户长时间坐在登录页面上后甚至在会话超时后无需刷新页面也可以登录. 每当会话超时时,是否可以创建新的DOM?

The requirement is to allow user to login after sitting on the login page for a long time and even after the session times out without a page refresh. Is there a way to create a new DOM whenever session times out?

推荐答案

没有这种方法.只需将JSF状态保存方法设置为client.这样,视图将永不过期.

There is no such way. Just set the JSF state saving method to client. This way the view will never expire.

<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
</context-param>

这只会将内存使用情况与网络带宽进行交易(例如,较低的内存使用情况和更多的网络带宽使用情况).启用部分状态保存后,网络带宽使用增加应该相对较小,并且可以通过缩小,压缩等方式轻松赚回.

This will only trade memory usage for network bandwidth (e.g. lower memory usage and more network bandwidth usage). With partial state saving enabled, the network bandwidth use increase should be relatively minor and is easily earned back with minifying, compression, etc.

这篇关于会话超时后允许用户登录JSF 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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