• Post Reply Bookmark Topic Watch Topic
  • New Topic

SaveAs Dialog problem when downloading file via Servlet.

 
abbasaheb yadav
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All,
I am downloading a file from a servlet. The browser opens the file formats it can understand but for unknown file types the browser pops a SaveAs dialog. The problem I am facing is that even though I have set the Content-Disposition and Content-Type headers the SaveAs Dialog displays the name of servlet instead of the file I am downloading.
Please let me know if you anyone has found a solution to this problem.
Thanks.
Abba
 
Rob Levo
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having the exact same problem.
"save as" dialog is displaying the name of the servlet instead of the file I am downloading. The download does bring down the correct file, so it is just a problem with the name.
Can someone please help here to get the dialog name correct.
Thanks!
Rob
 
Billybob Marshall
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the Content-Type header include a 'filename' attribute?
Content-Type: blahblahblah; filename=xyz.dat; blahblahblah
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!