| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?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_4_0.xsd"
- version="4.0">
- <display-name>PMS</display-name>
- <welcome-file-list>
- <welcome-file>/js/index.jsp</welcome-file>
- </welcome-file-list>
- <resource-ref>
- <res-ref-name>jdbc/dc</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
- <resource-ref>
- <res-ref-name>jdbc/face_collect</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
- <!--
- 性能优化:HTML 和业务响应保持不缓存;版本化较弱的静态资源使用短期缓存,
- 并依靠 ETag/Last-Modified 在到期后校验。避免 JSP 和服务接口被浏览器长期缓存。
- -->
- <filter>
- <filter-name>ExpiresFilter</filter-name>
- <filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
- <init-param>
- <param-name>ExpiresDefault</param-name>
- <param-value>access plus 0 seconds</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType text/html</param-name>
- <param-value>access plus 0 seconds</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType application/json</param-name>
- <param-value>access plus 0 seconds</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType text/css</param-name>
- <param-value>access plus 1 hour</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType text/javascript</param-name>
- <param-value>access plus 1 hour</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType application/javascript</param-name>
- <param-value>access plus 1 hour</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType image/png</param-name>
- <param-value>access plus 1 day</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType image/jpeg</param-name>
- <param-value>access plus 1 day</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType image/gif</param-name>
- <param-value>access plus 1 day</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType image/svg+xml</param-name>
- <param-value>access plus 1 day</param-value>
- </init-param>
- <init-param>
- <param-name>ExpiresByType font/woff2</param-name>
- <param-value>access plus 30 days</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>ExpiresFilter</filter-name>
- <url-pattern>/*</url-pattern>
- <dispatcher>REQUEST</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>INCLUDE</dispatcher>
- </filter-mapping>
- <filter-mapping>
- <filter-name>UrlFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>TokenFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- </web-app>
|