About the Tomcat Site Directory apk file cannot download the workaround

Source: Internet
Author: User

Today company website to add a mobile app, I directly uploaded the apk file to the root directory, and added a path to the page

<area shape= "rect" coords= "533,290,672,328" href= "<c:url value= '/wswhly.apk '/>"/>

But in the site click, how also can not download, but replaced with other file types (xls, FLV, etc.) on the download, query a lot of information, and later found in the Web. xml file, you need to add the file type of the apk suffix

<servlet-mapping> <servlet-name>default</servlet-name> <url-pattern> *.apk</url-pattern> </servlet-mapping>

After restarting the Tomcat service, you can download it normally.

Search on the Internet a lot of did not find a solution, hoping to help the needy friends.

This article is from the "Stable Happiness" blog, please be sure to keep this source http://yuanye1128.blog.51cto.com/8808749/1530118

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.