I want to receive a session timeout message when the session expires. Below is my spring -security.xml
<http auto-config="true" use-expressions="true"> <logout logout-success-url="/" invalidate-session="true" logout-url="/LogOut"/> <form-login login-page="/Login" username-parameter="Name" password-parameter="Pwd"/> <session-management invalid-session-url="/?timeout=true"> <concurrency-control max-sessions="1" expired-url="/Timeout?timeout=true" /> </session-management> </http>
According to my knowledge, using the above code, when the session has expired, it should redirect to /?timeout=true OR /Timeout?timeout=true . And when you exit the system, it should go to / . But in my case, when I log out of the system and redirect it to invalid-session-url , so I always get a true timeout for both normal logout and the session.
Please help me differentiate this.
UPDATE
/logout contains
session = request.getSession(); session.invalidate(); session = null;
java spring spring-mvc spring-security session
Prasanna kumar
source share