• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting response header

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

This site really helped me to pass my certification exam and I hope to get some help with issue I have been struggling the second week.

I am streaming the different types of files (PDF, DOC, and XML) and open them directly in the browser. The requirement is to keep the original name of the file, if user wants to save the opened file using the standard browser menu File-> Save As. In my java code, I set the following response header:

res.setContentType(Mimetype);
res.setHeader("Content-Disposition", "inline; filename=" + filename + ";");

It should work and it works fine with Mozilla Firefox, but it does not work with IE. I tried different combination of headers and quotation marks. Nothing is working for IE. I read that some versions of IE do not work properly with Content-Disposition header.
Is there some workaround for this? Please, help.

Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic