index.htmlcss
<html>html <head>java <title>hello</title>web </head>浏览器 <body>tomcat <h1>Hello World!</h1>安全 </body>服务器 </html>app |
web.xmlwebapp
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> </web-app> |
完整的Web应用还须要在WEB-INF目录下建立:
webapps
- hello
-index.html
-WEB-INF
-web.xml
-classes
-lib
<welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list>
server.xml
![]()
|
1) path:指定当前应用的名称;
2) docBase:指定应用的物理位置;
3) 浏览器访问路径:http://localhost:8080/atguigu/index.html。