I believe this related to a known issue with Internet Explorer where it ignores the first response content and sends a second request... although I only know that to happen with certainty when hitting a doPost() as opposed to a doGet(). This problem has been nagging us (and our customers) for several years. There are a couple workarounds we've been able to make work, but the most reliable is to write the PDF to the filesystem and return an HTML redirect as the response.
- Eric Hanson ReportMill Software, Inc. www.reportmill.com On Wednesday, April 24, 2002, at 07:18 AM, Ken Barron wrote: > Hi > I've seen a few similar questions on this mailing list but no answers > yet. > > I'm invoking a servlet through the showDocument() method in my Applet. > The doGet() method of the servlet generates a pdf file and writes it to > the > OutputStream. > > - In the Visual Age Websphere test environment, the file loads > correctly in > my browser, although often the doGet method is invoked twice (and the > file > is sent to the browser only after the second invocation). > - Using Webshpere 3.5.5, the servlet completes its execution and then I > get > the 'File Download' dialog. Clicking on either 'Save As...' or 'Open' I > get a download error of site unavailable. > > I've tried using both "Content-disposition","inline" > and "Content-disposition","attachment; file=xxx.pdf" > > I'm using response.setContentType("application/pdf"), setting the > content > length and flushing the outputstream. > I'm testing this with Internet Explorer 5.5 > > Any help much appreciated. > > Ken Barron > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html