Re: Session length??

Gokul Singh <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <007501c2e9d1$3c19b6b0$6401a8c0@rambo>
Which servlet container are you using?


> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's
> Java Servlet API Technology.
> [mailto:[email protected]] On Behalf Of Sam Seaver
> Sent: Thursday, March 13, 2003 2:44 PM
> To: [email protected]
> Subject: Re: Session length??
>
>
> Ive narrowed down the behaviour that is giving me the null
> pointer here.
>
> What happens is that I submit a job id, and it reloads the
> same page after having stored the job id in a bean.  The same
> bean then gets all the appropiate results, and stores a link
> to each result in a javascript-enabled button, as well as
> storing the results in an array in the session.
>
> When a button is clicked, the appropiate file is recalled
> from the array in the session, and the file is used in the
> resulting viewer window.
>
> What is going wrong is that if, once Ive submitted the job
> id, I wait for too long, when I finally click on one of the
> result buttons, the session attribute has expired.  This even
> happens when I set the maxInactiveInterval to -1 as suggested below.
>
> Anyone?
> Thanks
> Sam
>
> "JC Rules"
>
>
>
>
> >From: Gokul Singh <[email protected]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> >         Servlet API Technology." <[email protected]>
> >To: [email protected]
> >Subject: Re: Session length??
> >Date: Wed, 12 Mar 2003 19:28:01 -0700
> >MIME-Version: 1.0
> >Received: from mc4-f26.law16.hotmail.com ([65.54.237.161]) by
> >mc4-s15.law16.hotmail.com with Microsoft
> SMTPSVC(5.0.2195.5600); Wed,
> >12 Mar 2003 18:40:01 -0800
> >Received: from swjscmail2.java.sun.com ([192.18.99.108]) by
> >mc4-f26.law16.hotmail.com with Microsoft
> SMTPSVC(5.0.2195.5600); Wed,
> >12 Mar 2003 18:39:32 -0800
> >Received: from swjscmail1 (swjscmail1.Sun.COM [192.18.99.107])by
> >swjscmail2.java.sun.com (Postfix) with ESMTPid AD57C21553;
> Wed, 12 Mar
> >2003 19:35:27 -0700 (MST)
> >Received: from JAVA.SUN.COM by JAVA.SUN.COM (LISTSERV-TCP/IP
> release 1.8d)
> >with          spool id 6090550 for
> [email protected]; Wed, 12
> >Mar 2003          19:32:52 -0700
> >Received: from rediffmail.com (unknown [203.199.83.248]) by
> >swjscmail1.java.sun.com (Postfix) with SMTP id EEDB9481D for
> ><[email protected]>; Wed, 12 Mar 2003 19:22:50
> -0700 (MST)
> >Received: (qmail 3670 invoked from network); 13 Mar 2003
> 02:28:07 -0000
> >Received: from unknown (HELO rambo) (68.106.26.9) by
> mailserver with SMTP;
> >13          Mar 2003 02:28:07 -0000
> >X-Message-Info: APgguKHtcSDZjwTAwa8CxuA9lzZfScAM
> >Delivered-To: [email protected]
> >X-Priority: 3 (Normal)
> >X-MSMail-Priority: Normal
> >X-Mailer: Microsoft Outlook, Build 10.0.2616
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
> >Importance: Normal
> >Message-ID:  <000301c2e908$31114220$6401a8c0@rambo>
> >Sender: "A mailing list for discussion about Sun Microsystem's Java
> >       Servlet API Technology." <[email protected]>
> >In-Reply-To:  <[email protected]>
> >Return-Path: [email protected]
> >X-OriginalArrivalTime: 13 Mar 2003 02:39:33.0470 (UTC)
> >FILETIME=[C7BB17E0:01C2E909]
> >
> > > -----Original Message-----
> > > From: A mailing list for discussion about Sun Microsystem's Java
> > > Servlet API Technology. [mailto:[email protected]] On
> > > Behalf Of Sam Seaver
> > > Sent: Wednesday, March 12, 2003 12:49 PM
> > > To: [email protected]
> > > Subject: Session length??
> > >
> > >
> > > Dear all,
> > >
> > > I have a JSP file that sets the session length to 0, i read
> > > somewhere that this would mean the session would only expire when
> > > the browser window is closed.
> >
> ><sniped>
> >
> >Here is the extract from the javadocs for HttpSession
> >
> ><from api docs>
> >setMaxInactiveInterval
> >public void setMaxInactiveInterval(int interval)Specifies
> the time, in
> >seconds, between client requests before the servlet container will
> >invalidate this session. A negative time indicates the
> session should
> >never timeout.
> >Parameters:
> >interval - An integer specifying the number of seconds
> ></from api docs>
> >
> >I believe you are setting the timeout to zero, you are actually
> >invalidating the session. Try to use a -ve value for the
> timeout. All
> >session expire when the browser windows are closed. The time out
> >functionality is to make the sessions and related data expire on the
> >server side. It would not be a good idea not to have a
> session timeout,
> >as after sometime, the server will slowdown and crash because of
> >hanging sessions.
> >
> >
> >
> >Rgds,
> >Gokul
> >
> >
> >
> > > anyone?
> > > S
> > >
> > > _________________________________________________________________
> >
> >_____________________________________________________________
> __________
> >____
> >To unsubscribe, send email to [email protected] and
> include in the body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources:
> http://java.sun.com/products/servlet/external-> resources.html
>
> >LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail

________________________________________________________________________
___
To unsubscribe, send email to [email protected] and include in the
body of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.