Greetings:
I am creating an Excel spreadsheet from with a servlet and this works
fine when I call the servlet directly. But when I run the application
through a reverse proxy the spreadsheet comes up empty. The code snippet
looks like this:
response.setContentType("application/vnd.ms-excel");
response.addHeader("Content-Disposition",
"attachment;filename=calendar.xls");
OutputStream out = response.getOutputStream();
//Create a new workbook
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet s = wb.createSheet();
(all sorts of data gets added here)
wb.write(out);
out.close();
Checking the logs I see that the problem is an IllegalStateException:
...getOutputStream() has already been called.
Something in the reverse proxy must be getting the OutputStream and
holding onto it. Has anyone run into this before?
Thanks,
Bruce