On Friday January 19, 2001 Dave Frankson wrote:
> Hello all,
>
> I am experiencing a strange error, and I'm hoping someone can point me in the right
>direction.
>
> Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has two lines of
>code in its doGet method which forwards a request to a pdf:
>
> System.out.println("Forwarding to the PDF...");
> response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
>
> When I use IE 5.0 (version 5.00.2920.0000) and hit the servlet with a GET request,
>the servlet executes three times and then fails to redirect to the pdf.
>
> The weird thing is this doesnt happen in IE 5.5 and it doesnt happen in Netscape. I
>need to get this fixed, and I was hoping someone could point me at the code I need to
>work with.
I had this same problem a while back, and not just with Tomcat. I believe
I determined that IE 4.x and possibly 5.0 (I can't remember for certain),
but not 5.5 had a bug that prevented it from loading PDF files during a
redirect. The browser behaved just as you described, getting the page
several times and passing different headers each time. I think it was
trying to determine the content type by looking at the stream and
ignoring the content type sent by the web server. I could never find a
fix for it, so for those browsers that were affected, I simply redirected
to a page with a URL pointing to the PDF file. The user was required to
click on the URL to cpmplete the process. Those browsers work fine if the
user clicks on a PDF, just not on a redirect. Sad but true.
BTW, this question should probably have been posted to the tomcat-user
list, not tomcat-dev
Elijah Roberts
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]