我要啦免费统计

Redirect After Session Timeout in Spring

Overview

Session management is a crucial part for web applications requires user login. If session is not managed properly, the security of data is directly impacted.

Define session timeout in web.xml

In your Spring configuration file, add the following property:

web.xml
1
2
3
<session-config>
<session-timeout>60</session-timeout>
</session-config>

Change the value in the session-timeout tag to the number of timeout minutes you want to set.

Read More