• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File download

 
kausalya mohan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I tried the following code to download a file.
<%
String fileName = "abc.xml";
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.setContentType("text/xml");
%>

But when I execute this I get the file dialog,but when I click on the open button I get "Action cancelled".But I want to download the file.Can anybody help?

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic