http://blog.csdn.net/abin_gha/article/details/6274303
参考下这个
参考下这个
解决方案 »
- AdapterView.OnItemSelectedListener.onItemSelected参数问题
- android 如何用HTTP协议的POST传送文件(视屏(小于10MB))(文字)到服务器啊 小弟不胜感激!!
- listview下拉刷新 和分页的问题
- android 方向传感器绕x轴转的角度和绕y轴转的角度的值能获取的小数点后几位?
- android如何实现Iphone的coverflow,求demo,急急急急急急急急
- 11月语言排行榜
- andengine游戏开发中遇到的问题求大神指点
- 开发手机定位App
- 大神请进,我这个问题比较难求助关于listview 在2.3版本下的情况
- 蓝牙打印 二维码
- android报表问题
- android开发之GridView UI篇
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就行
Tom ---->WEB-INF目录
file目录
index.jsp文件WEB-INF的目录结构为: classes目录(空)
lib目录(空)
web.xml