HttpSessionListener (Servlet 4.0 API Documentation - Apache Tomcat 9.0.37)

javax.servlet.http

## Interface HttpSessionListener

- All Superinterfaces:
    java.util.EventListener

      public interface HttpSessionListener
      extends java.util.EventListener

  Implementations of this interface are notified of changes to the list of active sessions in a web application. To receive notification events, the implementation class must be configured in the deployment descriptor for the web application.
  Since:
    v 2.3
  See Also:
    `HttpSessionEvent`

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `sessionCreated(HttpSessionEvent se)` Notification that a session was created.
    `default void` | `sessionDestroyed(HttpSessionEvent se)` Notification that a session is about to be invalidated.

- - ### Method Detail

    - #### sessionCreated

          default void sessionCreated(HttpSessionEvent se)

      Notification that a session was created. The default implementation is a NO-OP.
      Parameters:
        `se` - the notification event

    - #### sessionDestroyed

          default void sessionDestroyed(HttpSessionEvent se)

      Notification that a session is about to be invalidated. The default implementation is a NO-OP.
      Parameters:
        `se` - the notification event

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.