HttpSessionIdListener (Servlet 6.1 API Documentation - Apache Tomcat 11.0.24)
Description: declaration: package: jakarta.servlet.http, interface: HttpSessionIdListener

# Interface HttpSessionIdListener

All Superinterfaces:
  `EventListener`

public interface HttpSessionIdListener extends EventListener
Implementations of this interface are notified when an `HttpSession`'s ID changes. To receive notification events, the implementation class must be configured in the deployment descriptor for the web application, annotated with `WebListener` or registered by calling an addListener method on the `ServletContext`.

Since:
  Servlet 3.1
See Also:
  - `HttpSessionEvent`
  - `HttpServletRequest.changeSessionId()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `sessionIdChanged(HttpSessionEvent se, String oldSessionId)`
  Notification that a session ID has been changed.

- ## Method Details

  - ### sessionIdChanged

    void sessionIdChanged(HttpSessionEvent se, String oldSessionId)
    Notification that a session ID has been changed.
    Parameters:
      `se` - the notification event
      `oldSessionId` - the old session ID