Reputation: 5075
i find that spring security, session concurrency is very strange.
<sec:session-management>
<sec:concurrency-control max-sessions="1" error-if-maximum-exceeded="true" />
</sec:session-management>
the code means that, just only one user can log in in time.
thanks for your response Best regards
Upvotes: 2
Views: 2461
Reputation: 242686
Make sure you didn't forget to configure a listener in web.xml
, as required for session management:
<listener>
<listener-class>
org.springframework.security.web.session.HttpSessionEventPublisher
</listener-class>
</listener>
Upvotes: 9
Reputation: 1262
I think Raghuram is right.
You try following:
<logout invalidate-session="true" logout-url="/logout.htm"
logout-success-url="/login.jsp?loggedout=true" />
Here I am invalidating session on logout and redirecting user to login page. Hope this is helpful. If this is not the case then let me know.
Upvotes: 0