Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 91656 invoked from network); 6 Nov 2000 00:00:39 -0000 Received: from lukla.sun.com (192.18.98.31) by locus.apache.org with SMTP; 6 Nov 2000 00:00:39 -0000 Received: from centralmail1.Central.Sun.COM ([129.147.62.10]) by lukla.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id RAA10482 for ; Sun, 5 Nov 2000 17:00:37 -0700 (MST) Received: from esun1as-mm. (esun1as-mm.Central.Sun.COM [129.147.34.144]) by centralmail1.Central.Sun.COM (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with SMTP id RAA21550 for ; Sun, 5 Nov 2000 17:00:37 -0700 (MST) Received: from eng.sun.com by esun1as-mm. (SMI-8.6/SMI-SVR4) id RAA17965; Sun, 5 Nov 2000 17:11:35 -0700 Message-ID: <3A05F4EC.3489C76D@eng.sun.com> Date: Sun, 05 Nov 2000 16:01:48 -0800 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.75 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org Subject: Re: Possible tomcat 3.2beta6 bug in session management References: <463436231.971425990071.JavaMail.root@porquerolles.garda-access.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N psomma@garda-access.com wrote: > 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 ? > Yes it is ... or at least it was. I just submitted a patch for this. Thanks for the bug report. > > Thanks for your attention > > Paolo Sommaruga > Craig McClanahan