Hello Hari,
            there is a method: 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 servlet documentation: HttpSession)
I hope it will help u!
Dan
-----------
Monday, October 29, 2001, 21:51:13, you wrote:

HY> Dear Freitag ,

HY>  It is working good on IE . But not on Netscape4.7.

HY>  I am trying to make it work. If you find any solution can you please let me
HY> know.

HY> Regards.
HY> Hari Yellina.
HY> ----- Original Message -----
HY> From: Pete Freitag <[EMAIL PROTECTED]>
HY> To: <[EMAIL PROTECTED]>
HY> Sent: Tuesday, October 30, 2001 4:30 PM
HY> Subject: Re: Inactive Time.


>> It looks like your mail reader replaced my java script comments with
HY> file://
>> it should just be two forward slashes ( // no space between).  That could
HY> be
>> the problem, because I tested the code on IE 5.5 and it worked fine.
>>
>> _____________________________________________
>> Pete Freitag ([EMAIL PROTECTED])
>> CFDEV.COM
>> Web Developer Resources
>> http://www.cfdev.com/
>>  Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea
>>  http://www.cfdev.com/activedit/
>>
>> -----Original Message-----
>> From: A mailing list about Java Server Pages specification and reference
>> [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina
>> Sent: Tuesday, October 30, 2001 12:22 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: Inactive Time.
>>
>>
>> Hi Freitag,
>>
>>  Thank you very much for the code. I have tried it on Netscape 4.7 and as
>> well on IE 5.5. Even I key in or move the mouse. At the click on 5 minutes
HY> I
>> am be redirected to other page.
>>
>>  Would you mind looking at the code . It would be very helpful for me.
>>
>> Regards,
>> Hari Yellina.
>> ----- Original Message -----
>> From: Pete Freitag <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Tuesday, October 30, 2001 3:36 PM
>> Subject: Re: Inactive Time.
>>
>>
>> > Hari, You are correct.
>> >
>> > That fact makes the problem more tricky, a solution is below...  It
>> assumes
>> > that doing something is either a mouse move or a key press, that should
HY> be
>> a
>> > reasonable assumption for this problem I think...
>> >
>> > <script>
>> > file://5 min = 5 * 60 * 1000 ms
>> > var msec = 300000;
>> > file://store intervalID as a global variable
>> > var intervalID = setInterval("timeOut()", msec);
>> >
>> > file://if a user does something give them 5 more min
>> > document.onkeypress = resetInterval;
>> > document.onmousemove = resetInterval;
>> >
>> > function timeOut()
>> > {
>> >         document.location = "/lock.jsp";
>> > }
>> >
>> > function resetInterval()
>> > {
>> >         file://cancel previous timer
>> >         clearInterval(intervalID);
>> >         file://make a new one
>> >         intervalID = setInterval("timeOut()", msec);
>> > }
>> > </script>
>> >
>> > _____________________________________________
>> > Pete Freitag ([EMAIL PROTECTED])
>> > CFDEV.COM
>> > Web Developer Resources
>> > http://www.cfdev.com/
>> >  Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea
>> >  http://www.cfdev.com/activedit/
>> >
>> > -----Original Message-----
>> > From: A mailing list about Java Server Pages specification and reference
>> > [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina
>> > Sent: Monday, October 29, 2001 10:04 PM
>> > To: [EMAIL PROTECTED]
>> > Subject: Re: Inactive Time.
>> >
>> >
>> > Dear Freitag,
>> >
>> >  Thanks for you answer. It definelty works, If  I am there for 5
HY> minutes.
>> > But a small problem. I want to redirect the page , if the user is
HY> inactive
>> > for 5 min. But your answer would work, if the user is there and using
HY> the
>> > application . every 5 minutes it is going to redirect.
>> >
>> >  Thank you in advance.
>> >
>> > Regards,
>> > Hari.
>> > ----- Original Message -----
>> > From: Pete Freitag <[EMAIL PROTECTED]>
>> > To: <[EMAIL PROTECTED]>
>> > Sent: Tuesday, October 30, 2001 1:41 PM
>> > Subject: Re: Inactive Time.
>> >
>> >
>> > > You can do this with java script, try something like this...
>> > >
>> > > <script language="JavaScript">
>> > >
>> > > file://call the timeOut Function in 5 minutes
>> > > setTimeout("timeOut()", (5*60*1000));
>> > >
>> > > function timeOut()
>> > > {
>> > >         file://redirect to a page that will expire the session on the
>> > server
>> > >         document.location = "/expireSession.jsp";
>> > > }
>> > > </script>
>> > >
>> > > _____________________________________________
>> > > Pete Freitag ([EMAIL PROTECTED])
>> > > CFDEV.COM
>> > > Web Developer Resources
>> > > http://www.cfdev.com/
>> > > Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea
>> > > http://www.cfdev.com/activedit/
>> > >
>> > >
>> > >
>> > > -----Original Message-----
>> > > From: A mailing list about Java Server Pages specification and
HY> reference
>> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina
>> > > Sent: Monday, October 29, 2001 9:16 PM
>> > > To: [EMAIL PROTECTED]
>> > > Subject: Inactive Time.
>> > >
>> > >
>> > > Hi All,
>> > >
>> > >  I am developing Point of Sale Application. I want user to lock the
>> System
>> > > in 5 minutes. It has to happen automatically, if the user is not using
>> for
>> > a
>> > > 5 minutes.
>> > >
>> > > If any one had solved this problem. Please mail and a piece of code
>> would
>> > be
>> > > of great Help
>> > >
>> > > Regards,
>> > > Hari.
>> > >
>> > >
>> >
>>
HY> ===========================================================================
>> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>> > JSP-INTEREST".
>> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>> > DIGEST".
>> > > Some relevant FAQs on JSP/Servlets can be found at:
>> > >
>> > >  http://archives.java.sun.com/jsp-interest.html
>> > >  http://java.sun.com/products/jsp/faq.html
>> > >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>> > >  http://www.jguru.com/faq/index.jsp
>> > >  http://www.jspinsider.com
>> > >
>> >
>> >
>>
HY> ===========================================================================
>> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>> > JSP-INTEREST".
>> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>> > DIGEST".
>> > Some relevant FAQs on JSP/Servlets can be found at:
>> >
>> >  http://archives.java.sun.com/jsp-interest.html
>> >  http://java.sun.com/products/jsp/faq.html
>> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>> >  http://www.jguru.com/faq/index.jsp
>> >  http://www.jspinsider.com
>> >
>> >
>>
HY> ===========================================================================
>> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>> JSP-INTEREST".
>> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>> DIGEST".
>> > Some relevant FAQs on JSP/Servlets can be found at:
>> >
>> >  http://archives.java.sun.com/jsp-interest.html
>> >  http://java.sun.com/products/jsp/faq.html
>> >  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>> >  http://www.jguru.com/faq/index.jsp
>> >  http://www.jspinsider.com
>>
>>
HY> ===========================================================================
>> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>> JSP-INTEREST".
>> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>> DIGEST".
>> Some relevant FAQs on JSP/Servlets can be found at:
>>
>>  http://archives.java.sun.com/jsp-interest.html
>>  http://java.sun.com/products/jsp/faq.html
>>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>>  http://www.jguru.com/faq/index.jsp
>>  http://www.jspinsider.com
>>
>>
HY> ===========================================================================
>> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
HY> JSP-INTEREST".
>> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
HY> DIGEST".
>> Some relevant FAQs on JSP/Servlets can be found at:
>>
>>  http://archives.java.sun.com/jsp-interest.html
>>  http://java.sun.com/products/jsp/faq.html
>>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>>  http://www.jguru.com/faq/index.jsp
>>  http://www.jspinsider.com
>>

HY> ===========================================================================
HY> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
HY> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
HY> Some relevant FAQs on JSP/Servlets can be found at:

HY>  http://archives.java.sun.com/jsp-interest.html
HY>  http://java.sun.com/products/jsp/faq.html
HY>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
HY>  http://www.jguru.com/faq/index.jsp
HY>  http://www.jspinsider.com



--
Best regards,
 Dan                            mailto:[EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to