#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Posts
    10
    Rep Power
    0

    Question


    I have made a servlet. If a remote user activates
    the servlet from a web browser, then decides to click the Stop button on the web browser before processing has finished, the transfer is interrupted to the user's web browser, but the servlet continues to run until it has finished.

    Is there a way to pass the message that the transfer has been interrupted by the user to the servlet and get it to stop processing immediately?

    Thanks for any info,
    Maarten

    Comments on this post

    • JimmyGosling agrees
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    the big smoke - London !
    Posts
    0
    Rep Power
    0
    I believe that when the browser has stopped listening for the HTTP responce (e.g. either through the stop button, browser shutdown or the obviosu one - browser crashing !) then whenever you try and write any data to the response PrintWriter then you get an IOException error (becasue the end of the pipe is closed).

    (Now the techie disclaimer !)
    I've Never tried this - but I recall reading it in the O'Reilly Servlet "kettle" book (incase you have a copy handy) and a friend has adivsed me to do the same thing once (never did - found it didn''t matter much in my project before I tried it)

    Comments on this post

    • JimmyGosling agrees

IMN logo majestic logo threadwatch logo seochat tools logo