I have a legacy application using JSPs and Servlets and deployed in WebSphere.
I create a new session on the server side by doing
Session session = request.getSession();
System.out.println(session.getSessionId());
This will create a new session for me. I print the sessionid.
Now I invalidate this session and then create a new session and try to print the new session id for the new session.
session.invalidate()
Session session = request.getSession();
System.out.println(session.getSessionId());
The second creation did create a new session object as it passes the isnew()
test. But the second session also prints the same sessionId.
I thought the sessionId was unique. Should the second session have the same sessionId as the first one?