views:

231

answers:

1

Hi, i want to upload files with Struts using the org.apache.struts.upload.FormFile but i would like to put a progress bar (like the gmail uploads forms or some like that), to upload the file (the files are big like 100Mb so the user must see what's going with the application). How i can do it?

Regards :)

A: 

You'll basically need to bring some shot of Ajax in so that the webbrowser and webserver can comminicate with each other asynchronously without the need to refresh/resubmit the page again and again. With Ajax the client will be able to poll the server for current progress at intervals and update the progress bar in the page accordingly.

Long story short, here's a nice blog article which covers this for the legacy Struts framework: http://kencochrane.blogspot.com/2006/03/ajax-struts-file-upload-progress-meter.html

BalusC