You can do it at the Wicket level as follows:
redefining implementation of SessionStore - redefine application # newSessionStore ()
@Override
protected ISessionStore newSessionStore() {
return new SecondLevelCacheSessionStore(this, new DiskPageStore()) {
@Override
protected void onUnbind(String sessionId) {
}
};
}
but this has a drawback: when the session expires (which is created by the servlet container), this code will not be called. In other words, you can only handle an event for a session caused by the gate itself.
API HttpSessionListener - ,
HttpSesionListener
WEB-INF/web.xml
<listener>
<listener-class>
your.listener.class.full.qualified.name
</listener-class>
</listener>