Session ID listener

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.213.209