web.xml 7.34 KB
<?xml version="1.0" encoding="gb2312"?>

<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

	<display-name>diligrp Manager Web App</display-name>

	<servlet>
		<servlet-name>dispatcherServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>classpath:spring.xml</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>dispatcherServlet</servlet-name>
		<url-pattern>*.do</url-pattern>
	</servlet-mapping>

	<filter>
		<filter-name>characterEncodingFilter</filter-name>
		<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>

	<filter-mapping>
		<filter-name>characterEncodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!--<filter>-->
		<!--<filter-name>UrlRewriteFilter</filter-name>-->
		<!--<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>-->
		<!--<init-param>-->
			<!--<param-name>logLevel</param-name>-->
			<!--<param-value>ERROR</param-value>-->
		<!--</init-param>-->
	<!--</filter>-->

	<!--<filter-mapping>-->
		<!--<filter-name>UrlRewriteFilter</filter-name>-->
		<!--<url-pattern>/*</url-pattern>-->
		<!--<dispatcher>REQUEST</dispatcher>-->
		<!--<dispatcher>FORWARD</dispatcher>-->
	<!--</filter-mapping>-->

    <!--权限拦截-->
    <filter>
        <filter-name>sessionFilter</filter-name>
        <filter-class>com.diligrp.manage.sdk.session.SessionFilter</filter-class>
		<init-param>
			<param-name>mustIframe</param-name>
			<param-value>true</param-value>
		</init-param>
        <init-param>
            <param-name>confPath</param-name>
            <param-value>manage.properties</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>sessionFilter</filter-name>
        <url-pattern>*</url-pattern>
    </filter-mapping>

    <!-- 利用redis权限拦截 -->
    <!--<filter>-->
        <!--<filter-name>sessionFilter</filter-name>-->
        <!--<filter-class>com.diligrp.manage.sdk.sessionRedis.SessionRedisFilter</filter-class>-->
        <!--&lt;!&ndash; ManageConfig 配置信息管理 &ndash;&gt;-->
        <!--<init-param>-->
            <!--&lt;!&ndash; redis 用户资源key &ndash;&gt;-->
            <!--<param-name>userResUrlKey</param-name>-->
            <!--<param-value>manage:userResUrlRedis:userId:</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
            <!--&lt;!&ndash; redis 所有资源key &ndash;&gt;-->
            <!--<param-name>allRes</param-name>-->
            <!--<param-value>manage:allResUrl</param-value>-->
        <!--</init-param>-->

        <!--&lt;!&ndash; redis 配置 START &ndash;&gt;-->
        <!--<init-param>-->
            <!--<param-name>maxIdle</param-name>-->
            <!--<param-value>500</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
            <!--<param-name>maxWaitMillis</param-name>-->
            <!--<param-value>1000</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
            <!--<param-name>testOnBorrow</param-name>-->
            <!--<param-value>true</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
            <!--<param-name>ip</param-name>-->
            <!--<param-value>10.28.6.152</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
            <!--<param-name>port</param-name>-->
            <!--<param-value>6379</param-value>-->
        <!--</init-param>-->
        <!--&lt;!&ndash; redis 配置 END &ndash;&gt;-->

        <!--&lt;!&ndash; ManageConfig 配置信息管理 START &ndash;&gt;-->
        <!--<init-param>-->
        <!--&lt;!&ndash; 后台权限系统域名 &ndash;&gt;-->
            <!--<param-name>domain</param-name>-->
            <!--<param-value>http://manage.dili7.com/</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
        <!--&lt;!&ndash;包含列表&ndash;&gt;-->
            <!--<param-name>includes</param-name>-->
            <!--<param-value>^$,^/$,^/.*\.do</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
        <!--&lt;!&ndash;排除列表&ndash;&gt;-->
            <!--<param-name>excludes</param-name>-->
            <!--<param-value>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*</param-value>-->
        <!--</init-param>-->
        <!--<init-param>-->
        <!--&lt;!&ndash;当前系统标识&ndash;&gt;-->
            <!--<param-name>system</param-name>-->
            <!--<param-value>manage</param-value>-->
        <!--</init-param>-->
        <!--&lt;!&ndash; ManageConfig 配置信息管理 END &ndash;&gt;-->
    <!--</filter>-->
    <!--<filter-mapping>-->
        <!--<filter-name>sessionFilter</filter-name>-->
        <!--<url-pattern>*</url-pattern>-->
    <!--</filter-mapping>-->


    <filter>
        <filter-name>DruidWebStatFilter</filter-name>
        <filter-class>com.alibaba.druid.support.http.WebStatFilter</filter-class>
        <init-param>
            <param-name>exclusions</param-name>
            <param-value>*.js,*.gif,*.jpg,*.png,*.css,*.ico,*.jsp,/druid/*,/download/*</param-value>
        </init-param>
        <init-param>
            <param-name>sessionStatMaxCount</param-name>
            <param-value>2000</param-value>
        </init-param>
        <init-param>
            <param-name>sessionStatEnable</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>profileEnable</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>principalCookieName</param-name>
            <param-value>SessionId</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>DruidWebStatFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>


    <!-- 配置 Druid 监控信息显示页面 -->
    <servlet>
        <servlet-name>DruidStatView</servlet-name>
        <servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
        <init-param>
            <!-- 允许清空统计数据 -->
            <param-name>resetEnable</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <!-- 用户名 -->
            <param-name>loginUsername</param-name>
            <param-value>dili</param-value>
        </init-param>
        <init-param>
            <!-- 密码 -->
            <param-name>loginPassword</param-name>
            <param-value>zaq12wsx#@!~</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>DruidStatView</servlet-name>
        <url-pattern>/druid/*</url-pattern>
    </servlet-mapping>



    <welcome-file-list>
		<welcome-file>/index.html</welcome-file>
	</welcome-file-list>
	
	<error-page>
		<error-code>500</error-code>
		<location>/error500.do</location>
	</error-page>
	
	<error-page>
		<error-code>404</error-code>
		<location>/error404.do</location>
	</error-page>
	
</web-app>