50 lines
1.5 KiB
XML
50 lines
1.5 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
|||
|
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
|||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|||
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
|
|||
|
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
|
|||
|
version="3.1">
|
|||
|
|
|||
|
<!-- 定义默认的欢迎文件列表 -->
|
|||
|
<welcome-file-list>
|
|||
|
<welcome-file>index.html</welcome-file>
|
|||
|
<welcome-file>index.htm</welcome-file>
|
|||
|
<welcome-file>index.jsp</welcome-file>
|
|||
|
</welcome-file-list>
|
|||
|
|
|||
|
<!-- 定义一些默认的MIME类型映射 -->
|
|||
|
<mime-mapping>
|
|||
|
<extension>html</extension>
|
|||
|
<mime-type>text/html</mime-type>
|
|||
|
</mime-mapping>
|
|||
|
<mime-mapping>
|
|||
|
<extension>txt</extension>
|
|||
|
<mime-type>text/plain</mime-type>
|
|||
|
</mime-mapping>
|
|||
|
<mime-mapping>
|
|||
|
<extension>jpg</extension>
|
|||
|
<mime-type>image/jpeg</mime-type>
|
|||
|
</mime-mapping>
|
|||
|
<mime-mapping>
|
|||
|
<extension>png</extension>
|
|||
|
<mime-type>image/png</mime-type>
|
|||
|
</mime-mapping>
|
|||
|
|
|||
|
<!-- 可以在这里定义一些默认的Servlet等,以下是一个简单示例 -->
|
|||
|
<servlet>
|
|||
|
<servlet-name>jsp</servlet-name>
|
|||
|
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
|
|||
|
<init-param>
|
|||
|
<param-name>fork</param-name>
|
|||
|
<param-value>false</param-value>
|
|||
|
</init-param>
|
|||
|
<load-on-startup>3</load-on-startup>
|
|||
|
</servlet>
|
|||
|
|
|||
|
<servlet-mapping>
|
|||
|
<servlet-name>jsp</servlet-name>
|
|||
|
<url-pattern>*.jsp</url-pattern>
|
|||
|
</servlet-mapping>
|
|||
|
|
|||
|
|
|||
|
</web-app>
|