Pitre, Russell wrote:
>
> response.setContentLength(baos.size());
>
Hi,
I added the size information as follows;
response.setContentType("application/pdf;charset=UTF-8");
// response.setHeader("Content-Disposition",
"inline;filename=\"Document.pdf\"");
response.setHeader("Content-Disposition",
"attachment;filename=\"Document.pdf\"");
response.setContentLength(baos.size());
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires", 0);
ServletOutputStream outstream = response.getOutputStream();
baos.writeTo(outstream);
// outstream.flush();
If I change the disposition to "inline", nothing changes in the browser.
With the "attachement", I get this error message dialog;
==========================================================
Internet Explore cannot download pdf example.jsp from localhost.
Internet Explore was not able to open this Internet site. The requested site
is
unavailable or cannot be found. Please try again later.
==========================================================
I suspect that Tomcat is not handling partial content request properly. IE
tends
to read PDF page by page as we read pages.
Regards.
--
View this message in context:
http://www.nabble.com/PDF-problem-on-IE-from-JSP-tp14879788p14896465.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]