Solution 9. File Uploads

GWT is a user-interface framework with hooks, in the form of remote procedure calls (RPCs), to the server. But generally, when you get to the server, you’re on your own. So you will undoubtedly need to build a good deal of server-side functionality yourself. Fortunately, in most cases, you can do that by taking advantage of existing opensource projects that can do the heavy lifting for you on the server.

A case in point is GWT’s support for file uploads. GWT provides a file upload widget that generates an HTML input field whose type is file, but provides no support for actually uploading the file on the server side.

Therefore, to actually upload files on the server, we turn to the Apache Commons FileUpload, from the Apache ...

Get Google Web Toolkit Solutions: More Cool Useful Stuff now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.