going CRAZY with servlet / xls download on winXP

S

szczepiq

Hi,

I made nice servlet (Struts action actually) that downloads xls (or
opens - depends what the users chooses).

headers:

response.setHeader("Content-Disposition", "attachment;
filename=report.xls");
response.setContentType("application/vnd.ms-excel");

works on win2k perfectly. I click a download link, then I can choose
whether to save or open - both work great.

Now win XP... Download works but when I choose to open the file - it
opens only if there is already ms-excel opened in the background. If
ms-excel is closed (typical scenario ;) ), IE 6.0 seems to download the
file (yes, the progress bar), then opens the ms-excel, then I see
beautiful error message that the file "documents and
settings/.../../report[1].xls" cannot be found.
In fact this file does not exists (IE's progress bar is a malicious
lier) in any place of the hdd.

Note that everything works on IE 6.0 (or firefox) in win2k (so I
decided not to post any code samples) but opening file fails on IE 6.0
in winXP

What is wrong then?

I tried plethora of different headers in every possible combinations
found in posts of similar (but not equal) problems with file downloads.

Pleaseeeeeeeeeeeee help or I will have to hire a psychiatrist
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top