tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Nix" <>
Subject Tomcat 5 and returning PDF in response outputstream
Date Fri, 01 Oct 2004 16:50:30 GMT
Has anyone else had trouble rendering PDF's (in Internet Explorer) when
sending the pdf directly into the response outputstream and rendering in
Internet Explorer?  I realize there are a lot of factors at work here,
but I find that my configuration works fine when I switch to Tomcat
4.1.30.  I'm setting the content type and content length on the
response.  The code I use is below:

	pdf = generatePDF();
	response.setHeader("Cache-Control", "max-age=30");
	response.setHeader("Content-Disposition", "inline;
filename=generated.pdf; size=" + pdf.getBytes().length);

If I access my url with Netscape, the pdf displays correctly.  If I save
it out to the filesystem (on server side), pdf displays correctly. It's
just something with the configuration of Tomcat 5 and Internet Explorer
that is not working correctly.  The same code posted above works for
both Netscape and IE when run under Tomcat 4.1.30.

Has anyone had similar problems?

Jeremy Nix
Senior Application Developer
Southwest Financial Services, LTD.
(513) 621-6699 x1158

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message