Hello, I am doing an upload of my applet has my website,
I works very well but I do not like putting a bar of Progress! (JPROGRESSBAR)!
CAN PLEASE HELP ME!
UPLOAD MY CODE!

    String targetURL = "http://localhost/swfupload/demos/swfobjectdemo/upload. aspx";
    PostMethod filePost = new PostMethod(targetURL);
    filePost.getParams().setBooleanParameter(HttpMethodParams.US E_EXPECT_CONTINUE,true);
    try {
       File targetFile = new File("C:\\temp\\pruebas\\1_MOV01114.rar"); // FICHERO

        UploadFichero.consola("Uploading " + targetFile.getName() +  " to " + targetURL);
        Part[] parts = {new FilePart("file", targetFile)}; //PARAMETROS

        filePost.setRequestEntity(
         &nbs p;      new MultipartRequestEntity(parts,
         &nbs p;      filePost.getParams())
         &nbs p;      );

        HttpClient client = new HttpClient();
        client.getHttpConnectionManager().getParams().setConnectionT imeout(50000);
// ----------------------
// ----------------------
    // HE IS DOING IN THIS LINE THE UPLOAD! HERE I HAVE TO MAKE THE CHANGE FOR PROGRESS, BUT HOW AND WHERE?
        int status = client.executeMethod(filePost);

        if (status == HttpStatus.SC_OK) {
         &nbs p;  UploadFichero.consola("Upload complete, response=" + filePost.getResponseBodyAsString() );
        } else {
         &nbs p;  UploadFichero.consola("Upload failed, response=" + HttpStatus.getStatusText(status) );
        }
    } catch (Exception ex) {
        UploadFichero.consola("Error: " + ex.getMessage());
        ex.printStackTrace();
    } finally {
        filePost.releaseConnection();
    }

Help me! PLEASE!
if there is another library that does the same to do otherwise!
Help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.