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 51419 invoked from network); 2 Mar 2000 10:58:51 -0000 Received: from mail.develop.com (HELO infoserver.develop.com) (209.110.197.12) by locus.apache.org with SMTP; 2 Mar 2000 10:58:51 -0000 Received: from yossarian (195.216.15.188 [195.216.15.188]) by infoserver.develop.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id GD69ZLS7; Thu, 2 Mar 2000 03:05:51 -0800 From: "Kevin Jones" To: , Subject: RE: HttpSession.isNew() Bug? Date: Thu, 2 Mar 2000 10:58:14 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-Reply-To: <38BD7B0D.FEB4B33F@yahoo.com> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I see this fix in the latest drop of Tomcat, but it doesn't work for me. In fact I never see the 'access' method called. So sessions still don't work for me! Kevin Jones DevelopMentor > -----Original Message----- > From: gyang [mailto:gyang]On Behalf Of Gary Yang > Sent: 01 March 2000 20:18 > To: tomcat-dev@jakarta.apache.org > Subject: Re: HttpSession.isNew() Bug? > > > I believe here is a bug. > > To fix it, add a line to the end of funciont > org.tomcat.session.StandardSession.access(): > this.isNew = false; > > i.e. replace file > src/share/org/apache/tomcat/session/StandardSession.java's line 339-349 > from > > /** > * Update the accessed time information for this session. This > method > * should be called by the context when a request comes in for a > particular > * session, even if the application does not reference it. > */ > public void access() { > > this.lastAccessedTime = this.thisAccessedTime; > this.thisAccessedTime = System.currentTimeMillis(); > > } > > to: > /** > * Update the accessed time information for this session. This > method > * should be called by the context when a request comes in for a > particular > * session, even if the application does not reference it. > */ > public void access() { > > this.lastAccessedTime = this.thisAccessedTime; > this.thisAccessedTime = System.currentTimeMillis(); > this.isNew = false; // ************this line should be added > > } > > > > > Gary Young wrote: > > > It seems isNew() always return true in Tomcat 3.1. > > I have tested the function using both JSP and servlet. > > Here is a JSP file: > > > > > > JSP session page > > > > > > <% > > HttpSession ses=request.getSession(true); > > if(ses.isNew()) { > > %> > > <%=ses.getId()%> > > <% } > > %> > > > > > > > > The file always outputs the session's ID when it is > > run > > in Tomcat. However, if the application server is IBM > > WebSphere(2.03 on Linux, and 3.02 on Solaris), it > > ouputs the ID only at the first time. > > > > Why does the function always return true? Is it a bug? > > > > __________________________________________________ > > Do You Yahoo!? > > Talk to your friends online with Yahoo! Messenger. > > http://im.yahoo.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org