O'Reilly logo

ExtGWT Rich Internet Application Cookbook by Odili Charles Opute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracking upload progress

If you expect really large file uploads, then it would be nice to report to your users, how much is already received. Even HTML pages allow implementing a progress bar by returning a multipart/replace response, or something like that. Tracking the upload progress may be done by supplying a ProgressListener.

ProgressListener is called quite frequently, depending on the servlet engine and other environment factors it may be called for any network packet. In other words, your ProgressListener may become a performance problem! A typical solution might be to reduce the activity of ProgressListener to only emit a message if the number of megabytes has changed beyond a range. The following example shows a ProgressListener which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required