Each session has an identifier that certificates the univocity of the session. When the web session changes, the ID also changes. The sessionIDlistener is used to monitor the changes of the session in the web application implementing the javax.servlet.http.HttpSessionIDListener interface and the following method:
...
@Override
public void sessionIdChanged(HttpSessionEvent event, String oldSessionId) {
logger.info("MySessionIdListener.sessionIdChanged: new=" + event.getSession().getId() + ", old=" + oldSessionId);
}
...
This example controls the change and prints the new and old session IDs.