简体   繁体   English

在特定时间后Flex Web应用程序超时并重定向到登录

[英]Flex Web Application Timeout after a specific time and redirect to login

All, 所有,

We have a Flex, Blazeds & Spring based Web application. 我们有一个基于Flex,Blazes和Spring的Web应用程序。 The requirement is that if the browser is idle for 30 minutes, we have to popup an error message to the user and then redirect to the login page. 要求是,如果浏览器闲置30分钟,我们必须向用户弹出一条错误消息,然后重定向到登录页面。 I have searched on this and was not able to find a suitable solution to this. 我已经搜索过此内容,但找不到适合的解决方案。 If someone can point me in the right direction, that would be great. 如果有人可以指出我正确的方向,那就太好了。 I really appreciate that 我真的很感激

Thanks 谢谢

Harish ish

Here's how I would approach it. 这就是我的处理方法。 When the app loads, start a 30 minute timer and add a listener to SystemManager for mouse movements. 应用加载后,启动30分钟计时器,并将侦听器添加到SystemManager以便鼠标移动。 Each time the mouse moves reset the timer back to 30 minutes. 每次鼠标移动都会将计时器重置为30分钟。 If the timer goes off, then display your modal dialog informing the user they've timed out. 如果计时器关闭,则显示模式对话框,通知用户他们超时了。 When they click OK, send them back to the login screen. 当他们单击确定时,将其发送回登录屏幕。 Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM