users@glassfish.java.net

Re: Glassfish and Jasper reports

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Thu, 28 Sep 2006 11:10:22 -0400

Hi,

smell like a bug :-) Can you file an issue and attach your war file? I
will give it a try :-)

Thanks

-- Jeanfrancois

derick.potgieter_at_gmail.com wrote:
> Hi all,
>
> Thanks for replying, but i cant see that it is a corrupt library. All my required library`s are bundled inside my war. This is where the strange part comes in. It is exactly the same war that i deploy on 8.2 and 9.1 b10/b13.
>
> It is just the stranges thing ever. Now i`m quite sure that glassfish is`nt coasing it directly, but they would it generate 20pages with date on 8.2 but 20 blank pages (same war) on glassfish.
>
> As thought that mabe the process of getting the output stream and writing the pdf to it is different on glassfish (cant see why). so mabe this code can help you guys...help me...
>
> private void generatePDFOutput(HttpServletRequest req, HttpServletResponse resp, JasperReport jasperReport, Map parameters) throws JRException, NamingException, SQLException, IOException {
> byte[] bytes = null;
>
> bytes = JasperRunManager.runReportToPdf(jasperReport, parameters, getConnection());
>
> resp.setContentType("application/pdf");
> resp.setContentLength(bytes.length);
>
> ServletOutputStream ouputStream = resp.getOutputStream();
> ouputStream.write(bytes, 0, bytes.length);
> ouputStream.flush();
> ouputStream.close();
> }
>
> As i said this works perfect on 8.2...Just another thing, there shouldn`t be a problem if my war goes over 30meg, should there??
>
> thanks
> Derick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>