3
如何使用spring3检测会话过期或会话超时。使用spring3检测会话过期或会话超时
如何使用spring3检测会话过期或会话超时。使用spring3检测会话过期或会话超时
的关键是这样的:
<beans:bean id="concurrencyFilter"
class="org.springframework.security.web.session.ConcurrentSessionFilter">
<beans:property name="sessionRegistry" ref="sessionRegistry" />
<beans:property name="expiredUrl" value="/session-expired.htm" />
</beans:bean>
expiredUrl指向的页面时,会话已过期显示。阅读规范中的完整解决方案:
你是什么意思“检测”?你想在哪里发现它? – cdeszaq
@cdeszaq:我会假设他的意思是触发一些功能 – Ralph
请添加一些细节。您的用户是否通过弹簧安全认证?你想用JavaScript动态处理过期的会话,还是静态地通过重定向到其他页面?你的用例是什么? – nont