Tomcat Incompatibility with IE6/Adobe Reader 6.0.1

From: Craig (craigrpeters_at_charter.net)
Date: 12/10/04


Date: 10 Dec 2004 08:27:34 -0800

Problem:

We want to develop a JSP which will be a generic file downloader,
handling Word, Excel, PDF, etc. When we try to display a PDF file via
JSP code from Tomcat, IE launches the Adobe Acrobat Reader 6 Plugin
(splash pages are displayed...), but then just a blank page is
displayed and the IE status says "Done". No error message is
displayed. No error is generated in the System Event logs. The PDF
should have been displayed in the IE browser window.

Client Environment:

- Windows XP or Windows 2000
- Adobe Reader 6.0.1 (occurs with 6.0.2 patch as well)
- Reader is set to open PDFs in the browser window
- IE 6.0.2800 (and 6.0.2900 XP sp2 patch)

Server Environment (Windows XP and Sun Solaris 8 tested)

- Tomcat 4.0.6/JDK 1.3.1 (no separate web server)
- Tomcat 4.1.31/JDK 1.4.2 (ditto)
- Tomcat 5.5.4/JDK 1.5.0 (ditto)
- No firewall
- No SSL is being used at this point (but it will eventually)
- No compression (no filters, etc.)

[On all Tomcat instances, confirmed the mime type for PDF exists and is
correct.]

Additional Information:

1) Our URLs are formed like this:

http://app.ourserver.com/appname/docViewPDF.jsp

2) Our app is issuing HTTP GETs, not POSTs.

3) This is happening on multiple PCs. One thing we noticed is this may
be Reader version dependent -- all PCs with Reader 5 installed did not
have the problem, but all PCs with Reader 6 have the problem.

4) When the problem occurs, if you then launch Reader manually, the
document that didn't display in the IE window is automatically
displayed in the full client Reader app.!!!

5) If we set Reader to not open up PDFs in browser windows, the Reader
window launches and opens the PDF file just fine. [This is a client
solution, and not practical to implement across hundreds of PCs
unfortunately.]

The Cause:

If we look at the .java file Tomcat produces from our source, we notice
Tomcat is adding "charset=ISO-8859-1" to the Content-Type header in the
response. You can see this in the HTTP response header

GET /wijsp/docViewAGN.jsp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint,
application/msword, application/x-shockwave-flash, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
CLR 1.1.4322)
Host: localhost:8080
Connection: Keep-Alive
Cookie: JSESSIONID=FC28B3020472C34A53807A8A8AA4CCD6; BPIimage=5

HTTP/1.1 200 OK
Content-Type: application/pdf;charset=ISO-8859-1 [<---- added by
Tomcat]
Content-Length: 589962
Content-disposition: inline; filename="Example.pdf"
Date: Thu, 09 Dec 2004 22:21:20 GMT
Server: Apache Tomcat/4.0.6 (HTTP/1.1 Connector)

There's no way to surpress it that we can find. If we rewrite the JSP
as a servlet and leave off the charset parameter, the problem goes
away.

We believe Tomcat isn't doing anything wrong -- IE6/Reader 6 just
done't seem to handle it properly. It appears this is a new bug in
Reader 6, and all our PCs with Reader 5 still installed work fine in
this situation.

Can anyone confirm?



Relevant Pages

  • Re: Popup window blocking in XP Service Pack 2
    ... > I have a web app that has a legitimate use for pop up windows. ... > I also use it later to display a pdf application form. ... If I display it in the main window then I would have to ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to read a pdf file with VB6?
    ... > What I'm looking is to read the pdf and display it on a separate form, ... > the ShowPDF form can be anywhere on the desktop or even on the secundary ... it's starting the reader and showing the file you give it... ...
    (microsoft.public.vb.controls)
  • Hide Reader window when printing from command line
    ... When I try to print a pdf from VB using shell with /t option, Reader ... opens, his window come on top for a few second, launch the ... the Reader window doesn't allow the user to keep working ...
    (comp.lang.basic.visual.misc)
  • Hide Reader window when printing from command line
    ... When I try to print a pdf from VB using shell with /t option, Reader ... opens, his window come on top for a few second, launch the ... the Reader window doesn't allow the user to keep working ...
    (microsoft.public.vb.general.discussion)
  • Re: full screen view on overhead projector?
    ... If you convert the file to a PDF, you should be able to use the Full ... Screen view in Acrobat (Reader) to display it. ...
    (microsoft.public.word.pagelayout)