80,351
社区成员
发帖
与我相关
我的任务
分享
Intent localIntent2 = new Intent();
localIntent2.setAction("android.intent.action.MAIN");
localIntent2.addCategory("android.intent.category.LAUNCHER");
localIntent2.addFlags(268435456);
localIntent2.setClassName("com.tencent.mm", "com.tencent.mm.ui.LauncherUI");
<?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就行