Use the OutputStream instead of the Writer:
Does anyone have a suggestion on how to server binary files through tomcat? I am creating a binary file as a result of a request and would like to let the user download it. Just setting mime type and passing through as an attachment doesn't work as write methods of the writer seem to truncate upper bits of the data.
response.getOutputStream()
Antonio Fiol
smime.p7s
Description: S/MIME Cryptographic Signature