测试过程中的体会:
第一、修改文件类型处理只需修改站点下,也就是WEB_INF下的web.xml文件即可
(a)、下载
<mime-mapping> <extension>zip</extension> <mime-type>application/zip</mime-type> </mime-mapping> <mime-mapping> <extension>rar</extension> <mime-type>application/rar</mime-type> </mime-mapping> <mime-mapping> <extension>exe</extension> <mime-type>application/octet-stream</mime-type> </mime-mapping> <mime-mapping> <extension>iso</extension> <mime-type>application/octet-stream</mime-type> </mime-mapping>
<mime-mapping> <extension>doc</extension> <mime-type>application/doc</mime-type> </mime-mapping>
(b)、打开
如果想要在IE中自动打开DOC,XLS,PDF文件的配置如下: <mime-mapping> <extension>doc</extension> <mime-type>application/msword</mime-type> </mime-mapping>
<mime-mapping> <extension>xls</extension> <mime-type>application/msexcel</mime-type> </mime-mapping>
<mime-mapping> <extension>pdf</extension> <mime-type>application/pdf</mime-type> </mime-mapping>
第二、测试的时候一定记得清除一下你浏览器的缓存(否则你会晕掉的),也就是打开IE“工具”-->“Internet选项”-->“常规”-->“删除文件”-->“清除历史”-->“确定” |
|