tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SMcGarr...@eschoolsolutions.com
Subject RE: byte serving PDFs
Date Fri, 13 Dec 2002 18:33:06 GMT
Elizabeth,

Tomcat does support this if I understand you correctly.

The following should hopefully achieve this for you (Put these into a JSP):

ByteArrayOutputStream ba = new ByteArrayOutputStream();

Read your PDF into ba .......

response.setContentType("application/pdf");
response.setContentLength(ba.size());
ba.writeTo(response.getOutputStream());
response.getOutputStream().flush();

I hope this makes sense and helps!

Steve

-----Original Message-----
From: Elizabeth Fisher [mailto:efisher@Primus.com]
Sent: Friday, December 13, 2002 1:01 PM
To: Tomcat Users List
Subject: byte serving PDFs


Does Tomcat support byte serving of PDFs?

-Elizabeth

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message