tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Salerno" <jul...@practica.com.au>
Subject session.getId() return value inconsistent - container management bug ?
Date Wed, 09 May 2001 06:54:50 GMT
hi all.

I have a code snippet :
////
  HttpSession session = req.getSession(true);
        System.out.println("session = "+session);
        System.out.println("session.getId() = "+session.getId());
////

On the http client side a test scenario involves Winblows, IE 5.something,
(Security - allow everything, restrict nothing).

Problem : the id of the session keeps changing !!!

HttpSession.getId() javadoc states : "Returns a string containing the unique
identifier assigned to this session. The identifier is assigned by the
servlet container and is implementation dependent."

Unique identifier for the session !!
Does this mean that the tomcat servlet container could be doing something
wrong ??

Here is some output. Note that the session is definitely the same across the
requests:

REQUEST_0
dispatcher = org.apache.tomcat.facade.RequestDispatcherImpl@66afb3
session = org.apache.tomcat.facade.HttpSessionFacade@20bf2c
session.getId() = gx1z2azbz1

REQUEST_1
dispatcher = org.apache.tomcat.facade.RequestDispatcherImpl@60e128
session = org.apache.tomcat.facade.HttpSessionFacade@20bf2c
session.getId() = mgqzufzc31


any ideas ??


Mime
View raw message