<?xml version="1.0"encoding="UTF-8"?> <web-app id="WebApp_ID"version="2.4" xmlns="http://java./xml/ns/j2ee"xmlns:xsi="http://www./2001/XMLSchema-instance" xsi:schemaLocation="http://java./xml/ns/j2eehttp://java./xml/ns/j2ee/web-app_2_4.xsd"> <display-name>och</display-name>
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring/spring-*.xml</param-value> </context-param>
<listener> <context-param> <param-name>webAppRootKey</param-name> <param-value>och.root</param-value> </context-param> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!--启用Spring的scope='request' --> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <!--CORS Filter --> <filter> <filter-name>CORS</filter-name> <filter-class>com.thetransactioncompany.cors.CORSFilter</filter-class> <init-param> <param-name>cors.allowOrigin</param-name> <param-value>*</param-value> </init-param> <init-param> <param-name>cors.supportedMethods</param-name> <param-value>GET,POST, HEAD, PUT, DELETE</param-value> </init-param> <init-param> <param-name>cors.supportedHeaders</param-name> <param-value>Accept,Origin, X-Requested-With, Content-Type, Last-Modified</param-value> </init-param> <init-param> <param-name>cors.exposedHeaders</param-name> <param-value>Set-Cookie</param-value> </init-param> <init-param> <param-name>cors.supportsCredentials</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>CORS</filter-name> <url-pattern>/*</url-pattern> </filter-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>control</filter-name> <filter-class>com.cmos.core.filter.IControlRequestFilter</filter-class> <init-param> <param-name>controlRequestImpl</param-name> <param-value>com.cmos.och.control.impl.ControlRequestImpl</param-value> </init-param> <init-param> <param-name>controlFilePath</param-name> <param-value>config/control.xml</param-value> </init-param> <init-param><!--Internationalization config --> <param-name>locale</param-name> <param-value>zh_CN</param-value> </init-param> </filter> <filter-mapping> <filter-name>control</filter-name> <url-pattern>/front/*</url-pattern> </filter-mapping>
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/front/*</url-pattern> </filter-mapping> </web-app>
|
|