Hi,

I'm doing something similar to you for exporting jasper reports (JasperPrint) 
objects to various output formats.

I think perhaps you are missing the call to FacesContext.responseComplete(), 
but I will show you all of my code, because there are also various flush() and 
close() calls in there which I found were necessary...


  |             final HttpServletResponse response =
  |                 (HttpServletResponse) 
context.getExternalContext().getResponse();
  |             final OutputStream responseStream = response.getOutputStream();
  |             response.setContentLength(stream.size());
  |             response.setContentType(contentTypes.get(outputType));
  |             if (outputType != ReportOutputType.HTML) {
  |                 response.setHeader("Content-Disposition", "attachment; 
filename=report." + outputType);
  |             }
  |             responseStream.write(stream.toByteArray());
  |             responseStream.flush();
  |             responseStream.close();
  |             response.flushBuffer();
  |             context.responseComplete();
  | 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024540#4024540

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024540
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to