Hi team,

My requirement is to take the BytearrayOutputstream and open to a browser.

I have written the code like below :

response.setHeader("Expires", "0");
            response.setHeader("Cache-Control","must-revalidate, post-check=0, 
pre-check=0");
            response.setHeader("Pragma", "public");
            response.setContentType("application/pdf");
            response.setHeader("Content-disposition",
                        "inline; filename=foobar.pdf" );
            response.setContentLength(byteArrayOutputStream.size());
            ServletOutputStream outputStream = response.getOutputStream();
            byteArrayOutputStream.writeTo(outputStream);

              outputStream.flush();
              outputStream.close();
              byteArrayOutputStream.close();

But the browser is not opened..


Quick response is appreciated

Thanks & Regards,
Vijaya


______________________________________________________________________
IMPORTANT NOTICE. The information in this email (and any attachments) which is 
proprietary to American Life Insurance Company (ALICO) is confidential. If you 
are not the intended recipient, you must not use or disseminate the 
information. If you have received this email in error, please immediately 
notify me by "Reply" command and permanently delete the original and any copies 
or printouts thereof. Although this email and any attachments are believed to 
be free of any virus or other defect that might affect any computer system into 
which it is received and opened, it is the responsibility of the recipient to 
ensure that it is virus free and no responsibility is accepted by American Life 
Insurance Company for any loss or damage arising in any way from its use.
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText® is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to