I m using jasper reports to my project... here is my servlet class i m using .. i want to get the output from of the pdf file in client side... but i m not getting the stream of pdf in client side... even there is no errror showing in the tomcat server when i load nthis servlet using an html file ...... help is needed urgently
My point was that many people will search these forum to find answers to similar problems. When doing so, it's frustrating to find that someone else had the same problem and solved it but didn't note the solution.
What did you do that fixed it?
Joined: Jan 02, 2006
create a bytearrayoutputstream object /*ByteArrayOutputStream baos =new ByteArrayOutputStream();*/ set the content type for the response as pdf /*response.setContentType("application/pdf");*/ fill the outputstream object baos with jPrint object /*net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfStream(jPrint,baos);*/ set the content size for the output file (pdf) /*response.setContentLength(baos.size());*/ instantiate an object as ServletOutputStream to view the file in webpage /*ServletOutputStream out1 = response.getOutputStream();*/ write the exported outputstream to the servlet outputstream /*baos.writeTo(out1);*/ file nameis:SimpleServlet.java one more thing ben i have createda new topic creating xls file using jasper report.... could you please answer for me in this thread...... http://www.coderanch.com/forums/f-64/open-source [ January 11, 2006: Message edited by: jothish chokkalingam ]