• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

SaveAs Dialog problem when downloading file via Servlet.

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the Content-Type header include a 'filename' attribute?
Content-Type: blahblahblah; filename=xyz.dat; blahblahblah
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic