Java Programming - HttpClient Uploading File

Hi all,

I'm using httpclient class to connect my stand-alone application with a servlet which performs a file upload.

Everything works fine but ... I would like to display a progressBar to indicate the upload progress ...

Is it possible? Right now I only interact with the server part to send the request and get the final response after file uploading....

Regards

T

[405 byte] By [tlloretia] at [2007-11-26 23:30:31]
# 1
What exactly is your problem? Yes, it is possible to display a progress bar. http://java.sun.com/docs/books/tutorial/uiswing/components/progress.htmlWhether it's possible to get notified of the uploads progress I don't know because that httpclient is not part of Sun's API.
CeciNEstPasUnProgrammeura at 2007-7-10 14:41:39 > top of Java-index,Java Essentials,Java Programming...
# 2
My problem is that how can I be upgraded about uploading progress in from my stand-alone application (order to paint the JProgressBar ) if the uploading is being performed in a web-servlet and right now I "loose" connection with it until the whole uploading is finished...
tlloretia at 2007-7-10 14:41:39 > top of Java-index,Java Essentials,Java Programming...
# 3
I don't know. Which methods for that would this HttpClient API provide?
CeciNEstPasUnProgrammeura at 2007-7-10 14:41:39 > top of Java-index,Java Essentials,Java Programming...
# 4
Hi,One way is to override sendData from org.apache.commons.httpclient.methods.multipart.FilePart and add your custom code for monitoring and calculating progress file upload.Regards,Ivica
pivicaa at 2007-7-10 14:41:39 > top of Java-index,Java Essentials,Java Programming...