GeeCON Prague 2014*
The moose likes Servlets and the fly likes response.setHeader( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "response.setHeader("Content-Disposition") not working in IE alone" Watch "response.setHeader("Content-Disposition") not working in IE alone" New topic
Author

response.setHeader("Content-Disposition") not working in IE alone

Thanuja Vishwanath
Ranch Hand

Joined: Oct 07, 2010
Posts: 49
Hi all,

Iam creating a PDF and open that in browser using servlet. When user save that PDF, then the file name will be saved as its project name which is passed.

Iam setting the file name like this



When i save the PDF in chrome and firefox it is saved with the project name. Whereas if i save the PDF in IE then the file name is saved as the Servlet name and not the name mentioned in the content disposition.

Please advise.


Thanks,
Thanuja.
Tamas Ragoncsa
Greenhorn

Joined: Feb 25, 2011
Posts: 6

Hi Thanuja,

my experience is the same IE's behavior is strange with file downloads.
However there are some best practices.
http://onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html

I hope this helps.

Tamas
 
GeeCON Prague 2014
 
subject: response.setHeader("Content-Disposition") not working in IE alone