>>> akashmaheshwari <[EMAIL PROTECTED]> 9/24/99 5:26:28 PM >>>
>        i am wondering how do i know that some body had
>        clicked stop button on browser.

You know this because any further write or read from the streams
connected to the client (ie: the servlet's request's inputstream and
outputstream) will throw an exception.

>        Actually as soon as sombody clicks stop button the
>        thread in the servlet stop executing .

This is not quite right... the thread will continue but any write or
read will cause an exception that will probably stop your servlet from
executing (it can't really do anything if it can't write to the
client).

>        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

You don't need to do this... just write your servlet method like
this:

public void doGet(....
throws IOExceptiom,ServletException
{
  try
  {
      //your code...
   }
   catch(IOException e)
   {
       // here you know that something has gone wrong
       // most likely that the client has pressed STOP
   }
}


Hope that helps.

Nic Ferrier

___________________________________________________________________________
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