This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Manish Ramrakhiani
Ranch Hand
Posts: 44
  • 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
  • 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