tomcat 配置 web.xml 支持 sis CAB apk ipa 下载

将一些手机的一些应用程序放到tomcat里,下载时,会被默认为是zip包的形式,要求按照原来的格式下载,此时配置一下tomcat 的 web.xml ,这样就可以支持 sis CAB apk ipa 下载。

<!-- sisx 下载 配置      -->
<mime-mapping>
        <extension>sisx</extension>
        <mime-type>application/vnd.symbian.install</mime-type>
</mime-mapping>

<!--sis 下载 配置      -->
<mime-mapping>
        <extension>sis</extension>
        <mime-type>application/vnd.symbian.install</mime-type>
</mime-mapping>

<!--CAB 下载 配置      -->
    <mime-mapping>
<extension>cab</extension>
<mime-type>application/octet-stream</mime-type>
    </mime-mapping>
 
<!-- cab 下载 配置      -->
    <mime-mapping>
<extension>CAB</extension>
<mime-type>application/octet-stream</mime-type>
    </mime-mapping>

<!-- apk 下载 配置      -->
<mime-mapping> 
        <extension>apk</extension> 
        <mime-type>application/vnd.android.package-archive</mime-type> 
    </mime-mapping>

<!-- ipa 下载 配置      -->
<mime-mapping> 
        <extension>ipa</extension> 
        <mime-type>application/vnd.iphone</mime-type> 
    </mime-mapping>



<!-- xls  与 xlsx 下载 配置      -->
<mime-mapping>
        <extension>xls</extension>
        <mime-type>application/vnd.ms-excel</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>xlsx</extension>
        <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type>
    </mime-mapping>

你可能感兴趣的:(tomcat,手机)