Clicking on the cancel button during a file download will cause a socket
exception to occur.  However, there is one problem with catching this
exception.  I have found the Internet Explorer can send the Get command
several times for the downloading of one file.  It appears as if it will
send the initial command to get the file, then if some application is used
to view or unzip the file it will send a second request, and ignore the
results of the first request.  This causes a socket exception to occur.
 What I have done with my files is to put an download flag on the database
row which tracks the file.  Then you can create a background process which
will monitor files that have already been downloaded and delete those files
after some predefined number of days.

I hope this helps.

Jim G.

-----Original Message-----
From:   Amin, Nariman [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, June 12, 2000 8:29 AM
To:     [EMAIL PROTECTED]
Subject:        how to check if a file has been downloaded ?

I am writing a servlet that creates a file on the server, it then invokes
the 'save dialog window' on the client's screen. The user has the option of
either saving the file or cancelling the operation.

I need to delete the file after the user has selected any of the above
options.
Is there any way that I could check if the operation of downloading the
file
has been completed and/or  if the user has clicked on the 'cancel' botton ?

Any hint is appreciated.

Thanks in advance,
nariman.

___________________________________________________________________________
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