Hey all,
I'm currently using
Servlets (in fact
Struts Actions, but my problem is also reproducable with Servlets) to serve binary content stored into a database. Mainly images, pdf files, flash videos, office documents and such. I would like to display the content through the browser when possible, and let the users download the content otherwise.
Everything works fine until the binary data server gets mapped to an .htm extension (business requirement of my application). At that point, IE breaks showing only a blank page.
Here is a reproduced version of the problem:
Works fine with that web.xml
But breaks IE ( blank page) with that one:
I’m aware that
can be used to force the download of every single file (inline mode don’t make any difference). Still, it would be a pain to have users downloading files such as jpg images and pdfs just because IE can’t handle MIME types appropriately.
Anyone got a better workaround or suggestion?
Cheers,