DWR 3.0 features a new FileConverter that handles the following binary files:
In order for upload to work, commons-fileupload and commons-io are required on the classpath. See the commons-upload dependency chart for more information. DWR will give you the error message: "file uploads not supported" if this JAR file is missing.
<init-param>
<param-name>fileUploadMaxBytes</param-name>
<param-value>5000</param-value>
</init-param>
<init-param>
<param-name>org.directwebremoting.dwrp.FileUpload</param-name>
<param-value>your.package.YourFileUploadImpl</param-value>
</init-param>
The DWR war file contains a number of examples of generating PDF files, as well as uploading and downloading images. Full source and explanations are included with these examples.