jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes Progress Bar for file Upload! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Progress Bar for file Upload!" Watch "Progress Bar for file Upload!" New topic
Author

Progress Bar for file Upload!

Declan Conlon
Ranch Hand

Joined: Jul 03, 2001
Posts: 34
When data is written to a DataOutputStream constructed from a getConnection from a URLConnection, is the data written to the target(i.e. the server) instantly? Despite calling flush on my stream the VM buffers it all before sending it.
Why?
Do I need to do additional things? Is there a way around it? Note the code I have uploads the file I just can't find out how much data has been written, which I need for a file upload progress bar. Is there any way of determining the state of the upload, or is this an shortcoming of java and it is an impossible task? Help required urgently, thanks for all your contributions to the problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Progress Bar for file Upload!
 
Similar Threads
Design Suggestions Needed!
progressbar in real time and streams
progress bar and timeout functionality for file upload
data loss during file transfer from applet2servlet
progressbar for downloading file