Web应用的组成结构

directory:Web应用所在目录

  |

  |————html、jsp、css、js文件等:这些文件一般存放在web应用根目录下,根目录西的文件外界可以直接访问

  |

  |————WEB-INF目录:java类、jar包、web应用的配置文件存放目录,该目录文件外界无法直接访问,由web服务器负责调用

          |

          |————classes目录——(java类)

          |————lib目录————(java类运行所需的jar包)

          |————web.xml文件—(web应用的配置文件)

  

一个schema模板web.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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_3_0.xsd"
  version="3.0">

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

</web-app>

原文地址:https://www.cnblogs.com/flying607/p/3446098.html