akashmaheshwari wrote:
>
> Hi all,
>         i am wondering how do i know that some body had
>         clicked stop button on browser.
>         Actually as soon as sombody clicks stop button the
>         thread in the servlet stop executing .
>         in my service method of servlet i setting a flag.
>         i want to do flag = false when sombody clicks the
>         stop button or when service method is over.
>         any clue please

The short answer is you can't. The slightly longer answer is that the browser
does not send any request to the server when the user clicks stop. So, your
servlet is not notified at all when this occurs. However, when the user clicks
the stop button, an exception will be thrown when your servlet attempts to write
to the output stream. You can catch the exception and deal with it at that
point. The exception that is thrown is an "IOException: Broken Pipe."

Kevin Mukhar

___________________________________________________________________________
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