Hello,
How can one detect if a connection has been closed from servlet side?
Namely, I have a file upload servlet. You upload an image, and the
image is processed tru imagemagick, only after the image has been
processed the servlet returns a success message.
if the user presses the cancel button, which calls xhr.abort how can i
detect this from the servlet side? it appears that regular servlets
can not do it, so maybe a comet servlet can do?
Jean Francois Arcand told me previously that onInterrupt method can be
used to detect if connection is aborted.
Now: how can I make a hybrid of a comet servlet and a regular file
upload servlet, that will can detect user pressing the cancel button?
Within a regular servlet, the file upload logic can detect that the
upload is not complete, thus rollback changes - but if the user
presses the cancel button, while image magick is processing, there is
no way to detect this and thus rollback.
Best.
-C.B.