http://blog.csdn.net/abin_gha/article/details/6274303
参考下这个

解决方案 »

  1.   

    http://www.eoeandroid.com/thread-277449-1-1.html
      

  2.   

    1.进入Tomcat的webapp目录后,建一个目录,暂取名Tom
    2.进入Tom在新建两个目录1) file目录,里面存放你要下载的文件 2) WEB-INF 目录
    3.建两个目录的同时在建设一个index.jsp文件WEB-INF目录下新建一个web.xml
    里面内容如下
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
      <display-name>Tom</display-name>
      <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
      </welcome-file-list>
    </web-app>
    index.jsp的内容如下
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <a href="file/guo.zip">click me</a>
    </body>
    </html>
    guolei.zip这个是文件名,你可以随便改的然后重启Tomcat 
    http://localhost:8080/Tom即可 手机访问将localhost换成服务器IP就行
      

  3.   

    目录结构
    Tom ---->WEB-INF目录
             file目录
              index.jsp文件WEB-INF的目录结构为: classes目录(空)
                       lib目录(空)
                       web.xml