File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes File download Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "File download" Watch "File download" New topic
Author

File download

kausalya mohan
Greenhorn

Joined: Aug 02, 2007
Posts: 1
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.
 
Consider Paul's rocket mass heater.
 
subject: File download
 
Similar Threads
word file not getting downloaded on Netscape6
Japanese filename coming s junk
word file not getting downloaded on Netscape6
download problem
How to handle randomly generated files?