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

webapp.WEB-INF.web.xml Maven / Gradle / Ivy

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

  <display-name>app</display-name>
    <!-- Spring容器启动监听器配置 -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <!--<listener>-->
        <!--<listener-class>com.hframework.listener.ModelLoaderListener</listener-class>-->
    <!--</listener>-->
    <!--<listener>-->
        <!--<listener-class>com.hframework.listener.DataSetLoaderListener</listener-class>-->
    <!--</listener>-->

    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>

    <listener>
        <listener-class>org.activiti.hframework.bridge.explorer.servlet.WebConfigurer</listener-class>
    </listener>

    <!-- To allow session-scoped beans in Spring -->
    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>

    <filter>
        <filter-name>UIFilter</filter-name>
        <filter-class>com.hframe.activiti.ext.filter.ActivitiExplorerFilter</filter-class>
    </filter>

    <filter>
        <filter-name>JSONPFilter</filter-name>
        <filter-class>org.activiti.hframework.bridge.explorer.servlet.JsonpCallbackFilter</filter-class>
    </filter>

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

    <filter-mapping>
        <filter-name>JSONPFilter</filter-name>
        <url-pattern>/service/*</url-pattern>
    </filter-mapping>

    <servlet>
        <servlet-name>Vaadin Application Servlet</servlet-name>
        <servlet-class>org.activiti.explorer.servlet.ExplorerApplicationServlet</servlet-class>
        <init-param>
            <param-name>widgetset</param-name>
            <param-value>org.activiti.explorer.CustomWidgetset</param-value>
        </init-param>
    </servlet>

    <servlet-mapping>
        <servlet-name>Vaadin Application Servlet</servlet-name>
        <url-pattern>/ui/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>Vaadin Application Servlet</servlet-name>
        <url-pattern>/VAADIN/*</url-pattern>
    </servlet-mapping>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:spring/spring-config.xml</param-value>
    </context-param>
    <context-param>
        <description>Vaadin production mode</description>
        <param-name>productionMode</param-name>
        <param-value>true</param-value>
    </context-param>
    <!-- SpringMVC启动控制分发 -->
    <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/spring-mvc-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>*.json</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <!-- 框架加载服务 -->
    <!--<servlet>-->
        <!--<servlet-name>frameInitServlet</servlet-name>-->
        <!--<servlet-class>com.hframe.tag.servlet.FrameInitServlet</servlet-class>-->
        <!--<load-on-startup>2</load-on-startup>-->
    <!--</servlet>-->

    <!--<servlet-mapping>-->
        <!--<servlet-name>frameInitServlet</servlet-name>-->
        <!--<url-pattern>/servlet/frameInitServlet</url-pattern>-->
    <!--</servlet-mapping>-->

    <filter>
        <filter-name>encodingFilter</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>encodingFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.json</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>

    <welcome-file-list>
        <welcome-file>login.html</welcome-file>
        <welcome-file>/login.html</welcome-file>
        <welcome-file>index.html</welcome-file>

    </welcome-file-list>
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <error-page>
        <error-code>404</error-code>
        <location>/404.html</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/500.html</location>
    </error-page>
</web-app>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy