user5182503
user5182503

Reputation:

How to add Shiro SessionListener when Shiro is used with Spring and web filter?

I want to add a session listener (org.apache.shiro.session.SessionListener) to SessionManager. As I found out when shiro web is used then by default the implementation of SessionManager is ServletContainerSessionManager. However, I didn't find any methods to add listeners in ServletContainerSessionManager. Could anyone say how to add this listener?

Upvotes: 0

Views: 278

Answers (1)

Brian Demers
Brian Demers

Reputation: 2080

The ServletContainerSessionManager is just a wrapper around the session management your Servlet container provides. If you want to use Shiro's SessionListner you would need to use a different SessionManager implementation, such as DefaultWebSessionManager

Upvotes: 0

Related Questions