Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 41497 invoked from network); 3 Jun 2008 12:13:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 12:13:57 -0000 Received: (qmail 34778 invoked by uid 500); 3 Jun 2008 12:13:51 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 34755 invoked by uid 500); 3 Jun 2008 12:13:51 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 34744 invoked by uid 99); 3 Jun 2008 12:13:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 05:13:51 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.61.246.114] (HELO srv-im-01.intern.infomotion.de) (213.61.246.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 12:12:55 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: AW: Problem generating a csv file for download Date: Tue, 3 Jun 2008 14:13:06 +0200 Message-ID: <302C50230E32AF488BFAFA755ECDAB8E55FB5B@srv-im-01.intern.infomotion.de> In-Reply-To: <4845325D.1010804@yale.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: AW: Problem generating a csv file for download Thread-Index: AcjFcZamqgnLEuf/SYOdFC5yCJnsFAAAQPEg References: <302C50230E32AF488BFAFA755ECDAB8E55FAA1@srv-im-01.intern.infomotion.de> <326915.29152.qm@web56706.mail.re3.yahoo.com> <302C50230E32AF488BFAFA755ECDAB8E55FAB3@srv-im-01.intern.infomotion.de> <4845325D.1010804@yale.edu> From: "Jan Froehlich" To: "Struts Users Mailing List" X-Virus-Checked: Checked by ClamAV on apache.org Hi Mark, Thank you for your hint, I tried it, but I can't see any change in the = behaviour. I solved it for me with putting the necessary properties into the = session so my action can handle all the requests. Not very beautiful but it works. FYI - I tried the whole process with Firefox and it works like ist = supposed to! So that is just (another) issue of web applications with Internet = Explorer! If someone needs a code snippet just tell me! Regards Jan -----Urspr=FCngliche Nachricht----- Von: Mark Shifman [mailto:mark.shifman@yale.edu]=20 Gesendet: Dienstag, 3. Juni 2008 14:00 An: Struts Users Mailing List Betreff: Re: AW: Problem generating a csv file for download I had problems downloading stuff when IE was the client. After snooping around google, I added these header lines and things worked but I don't really understand why. response.setHeader("Pragma", "public"); response.setHeader("Cache-Control", "max-age=3D0"); Jan Froehlich wrote: > Hey Dave, > thanks for your hint - I searched for "contype" and guess I found what > you meant.=20 >=20 > What I understood is, that IE sends two extra requests after the = "main" > request to identify the content type from content that has to be > displayed in a plug-in like Acrobat Reader. > For csv files its different. Those files are just plain text files = with > "Colon Separated Values" - means that no plugin is neccesary to = display. >=20 > For me it s nice to know, but unfortunately it doesn't solve my = problem. >=20 > Regards > Jan >=20 >=20 > Von: Dave Newton [mailto:newton.dave@yahoo.com]=20 > Gesendet: Montag, 2. Juni 2008 22:55 > An: Struts Users Mailing List > Betreff: Re: Problem generating a csv file for download >=20 > Isn't there something about IE that makes two calls, one with a > "contype" user agent request header? I remember seeing something about > that somewhere relating to PDF documents; I have no idea if it's = similar > for CSV or not, but it's easy enough to check the wire. >=20 > Dave >=20 >=20 > --- On Mon, 6/2/08, Jan Froehlich wrote: >=20 >> From: Jan Froehlich >> Subject: Problem generating a csv file for download >> To: "Struts Users Mailing List" >> Date: Monday, June 2, 2008, 1:28 PM >> Hi List, >> >> I'm developing an webapp generating csv files based on >> some hibernate >> queries - so far so good. >> >> Action "csvSelect" is used to display a form with >> a select box and a >> datetimepicker and to pass 2 parameters to the second >> action >> "csvGenerate" which is the one that generates the >> csv file. >> >> > class=3D"de.myfiles.actions.CsvSelect"> >> > type=3D"redirectAction"> >> > name=3D"actionName">csvGenerate >> >> > type=3D"tiles">tiles.page.select >> >> >> > class=3D"de.myfiles.actions.CsvGenerate"> >> > type=3D"stream"> >> >> To this point everything is working like a charm.=20 >> But when I set=20 >> >> response.setHeader("Content-Disposition", >> "attachment; filename=3Dmyfile.csv"); >> response.setContentType("text/x-download"); >> >> The action is called once and building my csv content - >> after I return >> SUCCESS it displays the Internet Explorer "Open / >> Save" dialog and when >> I click on "open" or "save" the action >> is called another time - but now >> I dont have access to the parameters passed from the first >> action. >> >> As I am new to struts2 and I am no native speaker I hope >> that someone >> understands what my problem is and gives me a clue! >> >> Thanks in advance! >> >> Jan Froehlich >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org >> For additional commands, e-mail: >> user-help@struts.apache.org >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org >=20 --=20 Mark Shifman MD. Ph.D. Yale Center for Medical Informatics Phone (203)737-5219 mark.shifman@yale.edu --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org