File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Detect if download completed? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Detect if download completed?" Watch "Detect if download completed?" New topic

Detect if download completed?

Steve Ford

Joined: Apr 19, 2004
Posts: 20
I am using ServletOutputStream to send binary data to a user. Is it possible to detect if the download has completed, and the user has NOT canceled the download while it was in progress?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I believe you would recieve some sort of broken stream exception if the user closes the browser before the download is complete.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Don't get me started about those stupid light bulbs.
subject: Detect if download completed?
It's not a secret anymore!