I want to send a PDF - File, which is generated by a Bean, to the Client. I have to 
send an byte[] back, but only an OutputStream can handle this.

--- JSP - CODE ---

response.setContentType("application/pdf");
ServletOutputStream out = res.getOutputStream();
out.write(eng.getPageData(1));

------------------

eng.getPageData(1) -> byte[]

Can I generate an OutputStream instead of a PrintWriter? - It does not work to 
generate an OutputStream and an PrintWriter!

Is it possible give the JSPCompiler a parameter, that generates an OutputStream 
instead of the PrintWriter?

Thanks.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to