You can achieve this using javascript.  At the end of the page, before
</BODY> u can have <script>....</script> which starts the timer ( use
setInterval function). This will be executed after every thing else in the
page is rendered.
Then using onclick of a button you can stop the timer or reset the timer.
If you have any images or applets it won't be the case, because each of
these will be different request.

Anil


                -----Original Message-----
                From:   Arun Jayaprakash [mailto:[EMAIL PROTECTED]]
                Sent:   Wednesday, October 25, 2000 2:33 AM
                To:     [EMAIL PROTECTED]
                Subject:        Threads in a servlet

                Hi,

                I need to create a servlet where a timer starts for 2
                minutes after the content has been loaded completely.
                If the user clicks a button in the page, the timer
                should stop or change the page once the 2 minutes are
                up.

                How should I go about doing this? Do I have to include
                a sleep() for 2 minutes after out.close() and try to
                catch InterruptedException?

                Bye,
                Arun.

                __________________________________________________
                Do You Yahoo!?
                Yahoo! Messenger - Talk while you surf!  It's FREE.
                http://im.yahoo.com/


___________________________________________________________________________
                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

Reply via email to