I finally was able to google the problem on a PHP board.  Apparently,
it's a cache issue with IE6.  You can work around it by adding the
following lines to your download code.

        res.setHeader("Cache-Control", "private");
        res.setHeader("Expires", "0");
        res.setHeader("Pragma", "cache");

res is the HttpServletResponse object

-----Original Message-----
From: Scott Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 3:40 PM
To: Struts Users Mailing List
Subject: RE: DownloadAction IE problem on Open

This happens the first time I attempt to download the file.  I also have
tried it on IE7 and Firefox and it works fine on both those browsers.
Only IE6 has a problem (don't have a IE5 or IE5.5 to try).  I also
looked in the cache (since the full path is in notepad) and there is
nothing there under file[1].txt or file.txt.

-----Original Message-----
From: Bindul Bhowmik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 3:23 PM
To: Struts Users Mailing List
Subject: Re: DownloadAction IE problem on Open

Hello Scott,

On 3/19/07, Scott Smith <[EMAIL PROTECTED]> wrote:
> I've implemented a file download using the Struts 1.2.9 version of
> org.apache.struts.actions.DownloadAction.  When the user hits the
> download button, he or she gets the save/open/cancel dialog with the
> correct filename.  In Firefox, hitting "save" or "open" does exactly
> what I expect (i.e., I can save the file or open it in notepad).  On
IE,
> "save" works as expected.
>
>
>
> However, in IE6, if I hit "Open", it opens notepad with a filename
that
> looks like "file[1].txt" (note the "[1]" which doesn't exist in the
> original filename and then it asks if I want to create a new file
since
> it appears the file didn't get downloaded.  Has anyone else seen this
> and found a solution?
>

This is not a IE bug, you can recreate the same easily using Firefox.
When you select 'open' in browsers, the file is actually downloaded to
your Temporary folder and opened. If a file with the same name exists
in the temporary folder, the browsers modify the file name to
differentiate it from the previous one. Usually if the file is named
'file.txt' subsequent download actions on Firefox would create
'file-1.txt', 'file-2.txt', and so on. On IE the series goes like
'file[1].txt', 'file[2].txt'.

>
>
> Scott
>
>
>
>
>
>

HTH
Bindul

-- 
Bindul Bhowmik
MindTree Consulting Ltd.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to