有没有办法同时导出很多pdf,用jasper report和jsf2
这是我用来导出 pdf 的代码:
HttpServletResponse httpServletResponse = (HttpServletResponse) FacesContext
.getCurrentInstance().getExternalContext().getResponse();
httpServletResponse.addHeader("Content-disposition", "attachement; filename=" + nom + ".pdf");
httpServletResponse.setContentType("application/pdf");
ServletOutputStream servletOutputStream = httpServletResponse.getOutputStream();
JasperExportManager.exportReportToPdfStream(jasperPrint,servletOutputStream);
//servletOutputStream.close();
//servletOutputStream.flush();
FacesContext.getCurrentInstance().responseComplete();
但是要同时导出两个,我将它们收集在这个:
List<JasperPrint> jprintlist = new ArrayList<JasperPrint>();
jprintlist.add(jasperPrint_1);
jprintlist.add(jasperPrint_2);
但我不知道如何导出它们
你有什么主意吗
先感谢您