It is necessary to receive all sessions of the active user (IP, browser ...). I receive the current session in the usual way: AuthenticatedWebSession.get() .

Is there a standard way in Wicket to get all sessions with the further possibility to select the current user session from them? Or is it the only option - to save in the database?

    1 answer 1

    Try hanging up a session listener, like:

     public class SessionListener implements HttpSessionListener { private static AtomicInteger totalSessions; public static int getTotalSession(){ return totalSessions.get(); } @Override public void sessionCreated(HttpSessionEvent event) { totalSessions.getAndIncrement(); } @Override public void sessionDestroyed(HttpSessionEvent event) { totalSessions.decrementAndGet(); } } 

    The listener must be declared in the web.xml