Can i go logout page on inactivity

試著忘記壹切 提交于 2019-12-13 11:13:53

问题


Please suggest me solution to go logout page on inactivity just like bank pages will do. After session timeout, app has to display login page to login to the application. I am using Spring acegi security. Your help is greatly appreciated. Thank you for your time.


回答1:


One possibility is, you could place a javascript (or Meta refresh) in your web page, which makes a request to the server after the timeout period. This will automagically redirect to the login page.




回答2:


you have to just put this in your jsp page "head" tag

<meta http-equiv="refresh" content="${pageContext.session.maxInactiveInterval};url=login">

In above url you have to set your login controller path. After session expired your page will be redirected to the url specified by you.



来源:https://stackoverflow.com/questions/4371498/can-i-go-logout-page-on-inactivity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!