Alright, I have an interesting problem, which is only an issue with Windows XP SP2 and Internet Explorer.
We have a
servlet which reads report files (both pdf and csv) from a directory outside of our EAR deployment. The servlet reads the files, and just writes it out to the browser.
This worked perfectly before, but since we upgraded to Windows XP SP2, along with an Internet Explorer update, the csv files come back messed up.
When the csv file opens, it opens inside Excel... inside the browser, which is what we want (and how it always worked).
However, now with the new upgrades, instead of being properly formatted (comma delimited fields are in separate cells), each line of data in the CSV file is jammed inside the first cell in Excel. The csv file itself is perfectly formatted, because if I open the csv in Excel or IE manually, it is displayed properly.
It is my understanding that with SP2, a 'fix' was added to remove a vulnerability with the MS Text engine, so 'strict' mime types are required.
We are currently doing:
response.setContentType( "text/csv" );
response.setHeader("Content-Disposition","filename=report.csv" );
I have also tried making the content type application/octet-stream with no luck.
This is a weird situation, and I can't find anything on Google about it.