tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Threepwood <joea_96...@yahoo.com>
Subject Tomcat Filters and Filter Mapping to Force download
Date Wed, 04 Oct 2006 01:29:53 GMT

I am using a filter to set the content type and header to to force
downloading of linked files, so that they open with their registered app
instead of within IE. I am doing this with the following code:

response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition","attachment; filename=" +
fileName); 

It is working great for files uploaded to the server after the changes. But
files uploaded before the changes are still either opening in the web
browser using the apps plugin or displaying directly in the web browser
usually as jumbled binary. 
I was wondering why this is happening? I thought the filter was to apply at
run time, so when the file is being downloaded, and thus should open as the
newly upload files do. Thanks for the help. 

Joe
-- 
View this message in context: http://www.nabble.com/Tomcat-Filters-and-Filter-Mapping-to-Force-download-tf2379764.html#a6632138
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message