File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Content type = application/force-download not working for IE

 
Manish Ramrakhiani
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have written a Servlet with:


However, this is working absolutely fine on Chrome but when I run it on IE, it throws error saying"can not download from servlet name".

Any pointers, what could be the problem.

Thanks,
Manish Ramrakhiani
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what version of IE?
One problem is that in some versions it tries to be too clever about the content type and tries to work it out on its own.
A hack we have used on occasion is to add a fake extension at the end of the URL to provide a hint, but in your case you want the opposite.
To do this, add ".csv" as the last parameter on the URL eg /context/MyServlet?.csv or /context/MyServlet?param1=value&.csv
I kid you not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic