• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting response header

 
Ludmila Snova
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic