Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 64195 invoked from network); 17 Dec 2005 20:16:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Dec 2005 20:16:31 -0000 Received: (qmail 77204 invoked by uid 500); 17 Dec 2005 20:16:29 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 77185 invoked by uid 500); 17 Dec 2005 20:16:28 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "POI Users List" Reply-To: "POI Users List" Delivered-To: mailing list poi-user@jakarta.apache.org Received: (qmail 77174 invoked by uid 99); 17 Dec 2005 20:16:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2005 12:16:28 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.86.89.69] (HELO smtpauth09.mail.atl.earthlink.net) (209.86.89.69) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Dec 2005 12:16:27 -0800 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=Hg1tYl5r+K+xLm9pnb3VIjC8ZbtMVLT9eC5QZO7LkunEfN1kVUS3Q8gKLfCk5AbV; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:X-ELNK-Trace:X-Originating-IP; Received: from [69.3.16.6] (helo=[192.168.1.100]) by smtpauth09.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1EniTN-0008MX-Lp for poi-user@jakarta.apache.org; Sat, 17 Dec 2005 15:16:06 -0500 Message-ID: <43A47311.4050607@earthlink.net> Date: Sat, 17 Dec 2005 14:20:33 -0600 From: Dick Hildreth User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: POI Users List Subject: Re: HSSF Failure in IE References: <0E071FA35418D811970500508BBB98190A5C31@ganymed.allocation.net> In-Reply-To: <0E071FA35418D811970500508BBB98190A5C31@ganymed.allocation.net> Content-Type: multipart/alternative; boundary="------------060407060006020007050008" X-ELNK-Trace: f8e229030ada1acf3893badfe20490f24d2b10475b571120dee28d0852f6ad1c2c6fd6d63a8f63693561e17022e7c96e350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 69.3.16.6 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------060407060006020007050008 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Tobias, Thank you very much! It didn't occur to me to mention that I was retrieving data via HTTPS, but when I saw your response, I knew that you had solved my problem. I modified my code as you suggested, and all is now well! Thanks again. Dick Tobias Meyer wrote: >We have had several issues with IE and downloads as well. >I'll try to summarize: > >1. Cacheing: >If the cacheing is completely disabled ( setHeader("Expires", 0) and alike - >not 100% sure what header exactly triggered this ), IE will refuse to write >the file to disk - at least when using SSL secured pages. If it is not in >the cache, you cannot display it, and you get "File not found" errors. >This is actually intentional, and not considered a bug by MS. > >To set zero-cacheing that works in IE and Mozilla alike (both, http:// and >https://) we use following code: > >/* Disabling the caching completely causes an error in IE, > * because IE internally uses the cache-file to provide the data to other >applications. > * No cache file - no data. > * Solution is to allow cacheing (pragma empty), but set > * the expires header to the same value as the date header. > */ > Date now = new Date(); > HttpServletResponse response = runData.getResponse(); > DateFormat headerDateFormat = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss >z",new Locale("en")); > headerDateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); > response.setHeader("Date", headerDateFormat.format(now)); > response.setHeader("Expires", headerDateFormat.format(now)); > response.setHeader("Pragma", ""); > response.setHeader("Cache-Control", "must-revalidate"); > > >2. The filename >IE and Mozilla handle the content-disposition: attachment differently. >This is critical when using non-ascii characters in filenames. >AFAIR there was an issue with a "+" character needed by mozilla, but >disallowed by IE. >Mozilla is RFQ compliant, IE is not. > >Cannot find the code right now, though... > >3. The mime-type. >We use >response.setContentType("application/vnd.ms-excel"); > >I'm not sure about the filname ending. It was always ".xls" for us in the >content-disposition, but never in the URL... > >Hth, >Tobias > > > >>-----Original Message----- >>From: Iain.Shepherd@barclayscapital.com >>[mailto:Iain.Shepherd@barclayscapital.com] >>Sent: Thursday, December 15, 2005 10:33 AM >>To: poi-user@jakarta.apache.org >>Subject: RE: HSSF Failure in IE >> >> >> >> >>>This one sends back a 'redirect' to the browser, telling >>>it to fetch outputxls.xls or even >>>outputxls.xls?filename=myworksheet&extension=.xls as the >>>final result. >>> >>> >>An alternative I've used is to fetch a filename like: >> >> >>>output.xls.jsp?parameters.... >>> >>> >>According to some MS Knowledge Base article I can't remember, >>even a URL >>like this will trick IE into treating it as a XLS. >> >>Iain >> >> >>-----Original Message----- >>From: Christian Gosch [mailto:c.gosch@inovex.de] >>Sent: 15 December 2005 08:35 >>To: POI Users List >>Subject: Re: HSSF Failure in IE >> >> >>There may be another issue, too, although I am curious about what >>happens when using "Content-Disposition" in correct capitalization. >> >>IE uses different information sources to determine whats >>coming over the >>net, as I said before. I forgot to mention the "extension of the URL". >>Its a bit funny, but it _may_ help to append ".xls" to the >>request which >>finally gets the data. >> >>For example: We have a JSP displaying a link to a struts action which >>does some preprocessing and forwards "externally" >>("redirect='true'" in >>struts-config.xml) to a servlet effectively producing the result. The >>link on the page is something like preparexls.do which calls something >>like PrepareXlsAction. This one sends back a 'redirect' to >>the browser, >>telling it to fetch outputxls.xls or even >>outputxls.xls?filename=myworksheet&extension=.xls >>as the final result. >> >>If everything else fails, you may check that out additionally. >> >>Regards, >>Christian >> >> >>On Wednesday, December 14, 2005 10:44 AM [GMT+1=CET], >>Nick Burch wrote: >> >> >> >>>On Tue, 13 Dec 2005, Dick Hildreth wrote: >>> >>> >>>>content-disposition: attachment; filename=actionitems.xls >>>> >>>> >>>>Content-disposition: attachment; filename=actionitems.xls >>>> >>>> >>>The header is called "Content-Disposition", isn't it? (Note the >>>capitalisation - that's the form that RFC2183 has it in anyway) >>> >>>Perhaps IE is being funny about the case? >>> >>>Nick >>> >>> >>> >>> >>--------------------------------------------------------------------- >> >> >>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org >>>Mailing List: http://jakarta.apache.org/site/mail2.html#poi >>>The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ >>> >>> >>Gruesse, >>-- >>Dipl.-Inform. Christian Gosch >>Systems Development >>inovex GmbH >>Karlsruher Strasse 71 >>D-75179 Pforzheim >>Tel.: +49 (0)72 31 - 31 91 - 85 >>Fax: +49 (0)72 31 - 31 91 - 91 >>mailto:c.gosch@inovex.de >>http://www.inovex.de >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org >>Mailing List: http://jakarta.apache.org/site/mail2.html#poi >>The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ >> >> >> >>-------------------------------------------------------------- >>---------- >>For more information about Barclays Capital, please >>visit our web site at http://www.barcap.com. >> >> >>Internet communications are not secure and therefore the Barclays >>Group does not accept legal responsibility for the contents of this >>message. Although the Barclays Group operates anti-virus programmes, >>it does not accept responsibility for any damage whatsoever that is >>caused by viruses being passed. Any views or opinions presented are >>solely those of the author and do not necessarily represent >>those of the >>Barclays Group. Replies to this email may be monitored by >>the Barclays >>Group for operational or business reasons. >> >>-------------------------------------------------------------- >>---------- >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org >>Mailing List: http://jakarta.apache.org/site/mail2.html#poi >>The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ >> >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org >Mailing List: http://jakarta.apache.org/site/mail2.html#poi >The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/ > > > > --------------060407060006020007050008--