File download broken all of a sudden?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matt_Pickell
Posted On:   Friday, June 12, 2009 01:50 PM

I'm having an issue where i cannot download files. In my application I set up commandButtons that, when clicked, redirect the response to a servlet that is used to open binary files (mostly PDFs, but others are not working either). The problem starting when integrating richfaces into the project which already uses myFaces. I also posted on the richfaces forum, but I am not sure it is necessarily related. Does anyone have an idea i should try here? I have debugged and I am creating the file on the server side, but when i write it to the output stream for the http response, it comes up with a ZERO size on the client (empty response body). The response header is fine is seems, the filename is fine, the "open or save file" dialog comes u   More>>

I'm having an issue where i cannot download files.



In my application I set up commandButtons that, when clicked, redirect the response to a servlet that is used to open binary files (mostly PDFs, but others are not working either). The problem starting when integrating richfaces into the project which already uses myFaces.



I also posted on the richfaces forum, but I am not sure it is necessarily related. Does anyone have an idea i should try here? I have debugged and I am creating the file on the server side, but when i write it to the output stream for the http response, it comes up with a ZERO size on the client (empty response body). The response header is fine is seems, the filename is fine, the "open or save file" dialog comes up, but when you try to open the file it is ZERO length. This is in the doPost method, not doGet, in the HTTPServlet.



We have some links that work, outputting CSV text files using writers to the outputstream in doGet of the servlet. It just seems like downloading binary files stopped working.

   <<Less
About | Sitemap | Contact