Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

File download  RSS feed

 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!