All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nutz.web.maker.web.xml.tmpl Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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">

    <!-- 启动gzip压缩 -->
    <filter>
        <filter-name>jettyGzipFilter</filter-name>
        <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
        <init-param>
            <param-name>mimeTypes</param-name>
            <param-value>text/plain,text/javascript,application/x-javascript,text/html,text/css,image/gif,image/png,image/jpeg</param-value>
        </init-param>
        <init-param>
            <param-name>minGzipSize</param-name>
            <param-value>1024</param-value>
        </init-param>
    </filter>
    
    <filter-mapping>
        <filter-name>jettyGzipFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <!-- nutz-mvc -->
    <filter>
        <filter-name>nutz</filter-name>
        <filter-class>org.nutz.mvc.NutFilter</filter-class>
        <init-param>
            <param-name>modules</param-name>
            <param-value>${pkg}.${pnm}MainModule</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>nutz</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>

    <!-- 欢迎页面 -->
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    
    <!-- 错误页面 -->
    <error-page>
       <error-code>404</error-code>
       <location>/404.html</location>
    </error-page>
    
    <!-- session过期时间 -->
    <session-config>
        <session-timeout>300</session-timeout>
    </session-config>
    
</web-app>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy