views:

1355

answers:

2

I have a web application (.war) that contains some static files (e.g. MS word documents). When I try to download these files, JBoss automatically sets some HTTP-headers in the response. Is there a way to configure JBoss (version 3.2.7) to set these headers to specific values (or omit them)? I'm especially interested in the

Cache-Control: no cache

header, because this leads to some problems when downloading files over https with Internet Explorer (IE will refuse to save the file to disk).

Btw. this behaviour can be changed by adding an entry to the windows registry:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"BypassSSLNoCacheCheck"=dword:00000001

but obviously I'm not going to ask customers to fiddle with their registry just to donwload a file.

Any suggestions are greatly appreciated.

A: 

An option that comes to mind is to wrap a servlet (or similar) around it - so that the URL that gets called calls your servlet, which then sets the headers you want and then delivers the underlying document.

Chris Kimpton
+2  A: 

Here is a description on the JBoss community wiki on how to disable the Cache-Control behaviour.

I wasn't aware of this IE6 feature until now. Does this also apply to IE7?

mkoeller