Downloading the APK file of the Android app becomes a zip Solution

Source: Internet
Author: User

Some time ago, the company developed the javaee project and the website provided download for Android applications. The results showed that the APK files downloaded by many 3G online users were changed to zip files, but the database is stored in the APK file path, recently cannot be understood, our company uses apache-tomcat7, I took a look at tomcat, it is found that there is a file web under conf under the apache-tomcat7. XML file. Many file types are configured, such:

    <mime-mapping>        <extension>wspolicy</extension>        <mime-type>application/wspolicy+xml</mime-type>    </mime-mapping>    <mime-mapping>        <extension>Z</extension>        <mime-type>application/x-compress</mime-type>    </mime-mapping>    <mime-mapping>        <extension>z</extension>        <mime-type>application/x-compress</mime-type>    </mime-mapping>    <mime-mapping>        <extension>zip</extension>        <mime-type>application/zip</mime-type>    </mime-mapping>

I think the Android app is a compressed file, so Tomcat should convert it to a zip file! I added the <web-app>

<mime-mapping>     <extension>apk</extension>     <mime-type>application/apk</mime-type> </mime-mapping>

Restart Tomcat and finally download the APK file! Haha
(Note: The server used at that time is a Linux Server)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.