index > Partnering with Microsoft > response.setHeader in IE

response.setHeader in IE


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.setContentType("application/xml");

response.setContentType("application/x-download");
response.setHeader("Content-Disposition", "attachement; filename="+ backupFileName);


OutputStream os = response.getOutputStream();
try
{
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) {
os.write(i);
}
fileInputStream.close();
System.out.println("file is written n closed and redirected is false");
redirected = false;

}
catch (FileNotFoundException fnfe)
{
System.out.println("FileNotFoundExcpetion"+fnfe.getMessage());
}

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.

regards,

krish

ksrk

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 ??AVA??code to make it compatible with IE 6 or IE 7.

MS ISV Buddy Team
reply 2

You can use google to search for other answers

 

More Articles

• never heard back
• How we can get Exchange VSAPI?
• Simple question on FrontPage / Internet Explorer
• Certification of Modules for DotNetNuke Web Portal Framework
• Not much there
• A Important Question about a program
• My new Buddy
• Get Ready for Windowa Vista - Compatibility info
• My buddy experience so far
• Visual Studio
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

• When you press pause.
• Not much there
• Insert Customer Reference Information
• Questions about using Windows Workflow E
• I don't even know what this program is...
• Program levels requirements
• Wrong mail in certification form
• Windows Vista Readiness Labs at TechEd06!!
• Microsoft Partner Program
• Thanks Buddy
• Partnering with Microsoft?
• Error in partner program signup form
• Windows Vista beta
• How can I be gold partner
• Real example: Converting a legacy databa

Hot Articles

• lost buddy
• Can I get Micorsoft.RuleEngine.dll ?
• Office 10 \ winword.exe runtime error
• Alcatel OmniPCX Office
• Importing data from Microsoft Access to
• licences for Open Src/non-profit projects
• A Important Question about a program
• No contact from my buddy
• Windows Vista Readiness Labs at TechEd06!!
• Update document properties on MS site se
• response.setHeader in IE
• Microsoft Partner Program
• Microsoft Tablet PC Partner Program Info
• Is Partner program open for non-consulti
• Wrong mail in certification form

Recommend Articles

• Great Idea for Forum
• Office Accelerator
• How we can get Exchange VSAPI?
• Team System for Empower ISVs
• Microsoft Partner Program
• Importing data from Microsoft Access to
• Simple question on FrontPage / Internet
• How can I connect to the Team Foundation
• microsoft need to work on explorer 7
• microsoft word 200 trouble
• Re: What's your experience with the budd
• Error in partner program signup form
• Real Case Scenarios and Examples
• Real example: Converting a legacy databa
• My new Buddy