Hi All,

I am trying to develop an web application java, thru which i can download an xml file.

My code is working fine in FireFox. But the same code is not working in IE 6 & 7, the file contents are displaying in the browser itself. I am not getting any download option.

Here is my code


response.setHeader("Content-Disposition", "attachement; filename="+ backupFileName);

OutputStream os = response.getOutputStream();
File fileToDownload = new File(backupFileName);
FileInputStream fileInputStream = new FileInputStream(fileToDownload);
System.out.println("inputStream is called");
int i = 0;
System.out.println("before writing");
while ((i = fileInputStream.read()) != -1) {
System.out.println("file is written n closed and redirected is false");
redirected = false;

catch (FileNotFoundException fnfe)

In the following url http://forum.java.sun.com/thread.jspa messageID=4284031

I had seen that it is a bug is IE 6. How can I resolve my problem.

can u guys plz help me out to fix this problem.



Re: response.setHeader in IE

MS ISV Buddy Team

Per the support engineer team:

After careful examination of this issue we are of the opinion that this is something to do with JAVA and not with any Microsoft product, since his code is working with Firefox but not with IE. They might have to modify their ¡°JAVA¡± code to make it compatible with IE 6 or IE 7.

-brenda (ISV Buddy Team)

Re: response.setHeader in IE


Content Headers are not Java specific. I would like to know how much money every day Microsoft costs the American economy in lost productivity