tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pso...@garda-access.com
Subject Possible tomcat 3.2beta6 bug in session management
Date Fri, 13 Oct 2000 08:33:09 GMT
Hi,

I have found a different session behavior between tomcat3.1 and
tomcat3.2

I have a code in a servlet that invalidates a session, if is present,
and creates a new session.
The servlet works without any problem with tomcat 3.1 but
with tomcat 3.2 beta6 there is the following exception:

javax.servlet.ServletException: java.lang.IllegalStateException: setAttribute: Session already
invalidated
	at com.ga.ify.web.WebFront.service(WebFront.java:169)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...

The code is:

        HttpSession session;
        if ((session = request.getSession(false)) != null) {
            // invalidate the old session
            session.invalidate();
            session = null;
        }
        // creates the new session
        session = request.getSession(true);
        session.setMaxInactiveInterval(TIMEOUT * 60);

There is a tomcat 3.2b6 bug ? 

Thanks for your attention


                        Paolo Sommaruga

                        Garda Access
                        Garda (Vr), Italy
                        http://www.garda-access.com/




Mime
View raw message