tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Kucks" <>
Subject PDF file viewing behaviour different for apache and tomcat..
Date Tue, 04 Jul 2000 03:15:31 GMT

I am using j2sdkee1.2.1 (tomcat 3.0 comes inside j2sdkee1.2.1) and have noticed that large
PDFs do not "stream" like they do when being served by the apache web server....

When getting a pdf from apache the pdf starts showing itself as soon as the download starts,
but getting the same pdf from tomcat the browser shows nothing until the entire file is down.
This is finde if the pdf is tiny, but I am serving several between 1MB and 8MB.

I had a look at the HTTP headers from each, and noticed a difference...apache serves up "Accept-Ranges:
bytes" and "Connection: Keep-Alive". Any idea if these two headers are controlling this behaviour?
and if so, how do I persuade tomcat to do the same thing?




Headers served up by apache:

D:\Program Files\Libwww>getheaders http://myhost/mydir/077_0104.pdf
Content-Type: application/pdf
Connection: Keep-Alive
Keep-Alive: timeout=15, max=100
Content-Length: 7601364
Accept-Ranges: bytes
ETag: "0-73fcd4-3957dd2e
Last-Modified: Mon, 26 Jun 2000 22:46:06 GMT
Server: Apache/1.3.11 (Win32)
Date: Tue, 04 Jul 2000 00:17:24 GMT

Headers served up by j2ee/tomcat:

D:\Program Files\Libwww>getheaders http://myhost:8000/myapps/myappdata/mydir/077_0104.pdf
Content-Length: 7601364
Content-Type: application/pdf
Date: Tue, 04 Jul 2000 00:18:45 GMT
Last-Modified: Mon, 26 Jun 2000 22:46:06 GMT
Servlet-Engine: Tomcat Web Server/3.0 (JSP 1.1; Servlet 2.2; Java 1.3.0; Windows
 NT 4.0 x86; java.vendor=Sun Microsystems Inc.)
Status: 200

View raw message