tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guilherme Orioli" <gui.ori...@gmail.com>
Subject Re: How can I refresh tomcat in the java code?
Date Wed, 02 Apr 2008 17:18:15 GMT
Ok... I've made some research on that too... I'm actually generating a
report (.pdf file) with jasper, and it already enables me to export it to an
outputstrem, as in this code:

memoryPDF = new FileOutputStream("test");
this.bytes =
JasperRunManager.runReportToPdf(jasperReport,parameters,this.getReport());
JasperExportManager.exportReportToPdfStream(bytes,memoryPDF);

This code is located in a method on my bean, which is on the action of a
<h:commandButton/>.  After creating the file, i don't know what to do to
send it as response.
What i was doing when i had the document on server before Tomcat startup
was:

HttpServletResponse response = (HttpServletResponse)
FacesContext.getCurrentInstance().getExternalContext().getResponse();
response.sendRedirect("test");

If you could help me sending this file created to be downloaded, it would be
a lot of help...

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message