This is from something over a year ago, so I guess it was IE 5.0.X or IE 5.5, and whatever was the version of Acrobat then. (I did not test in on Mozilla/Netscape).
-----Original Message----- From: Dinesh Villuri [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 1:56 PM To: [EMAIL PROTECTED] Subject: Re: Problem sending a pdf file from servlet I am just curious, on what all the versions of IE,Netscape and Acrobat Reader versions did you test this code. Thanks, Dinesh -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Asif Qamar Sent: Thursday, April 25, 2002 2:47 PM To: [EMAIL PROTECTED] Subject: Re: Problem sending a pdf file from servlet Here is what I do, and it seems to work for me: response.setHeader("Content-disposition", "attachement; filename=\"" + document.getName() + ".pdf\""); response.setContentType("application/pdf"); ServletOutputStream blobStream = response.getOutputStream(); blobStream.write(blob); // blob is type byte [] blobStream.flush(); -----Original Message----- From: Ken Barron [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 24, 2002 7:18 AM To: [EMAIL PROTECTED] Subject: Problem sending a pdf file from servlet 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 ___________________________________________________________________________ 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