<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
             xmlns="http://java.sun.com/xml/ns/javaee" 
             xmlns:web="http://java.sun.com/xml/ns/javaee" 
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd" 
             metadata-complete="true" 
             version="3.1">
  <display-name>i2sema</display-name>
  <listener>
    <listener-class>ch.qos.logback.ext.spring.web.LogbackConfigListener</listener-class>
  </listener>
  <context-param>
    <param-name>logbackConfigLocation</param-name>
    <param-value>/WEB-INF/config/logback.xml</param-value>
  </context-param>
  <resource-ref>
    <description>DB Connection</description>
    <res-ref-name>jdbc/i2sema</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
  <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>i2c-site-busan.root</param-value>
  </context-param>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    		classpath*:egovframework/spring/com/context-*.xml
    		classpath*:i2c/spring/**/*/context-*.xml
    		classpath*:i2c/datasource/mysql/datasource${server-type}.xml
    </param-value>
  </context-param>
  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <servlet>
    <servlet-name>i2c-site-busan</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/config/i2c/springmvc/*.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>  
  <servlet-mapping>
    <servlet-name>i2c-site-busan</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>i2c-site-busan</servlet-name>
    <url-pattern>*.jxml</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>i2c-site-busan</servlet-name>
    <url-pattern>*.json</url-pattern>
  </servlet-mapping>
  <servlet-mapping>	
  	<servlet-name>i2c-site-busan</servlet-name>
    <url-pattern>*.health</url-pattern>
  </servlet-mapping>  
  <servlet-mapping>
    <servlet-name>i2c-site-busan</servlet-name>
    <url-pattern>*.jhtm</url-pattern>
  </servlet-mapping>
  <filter>
      <filter-name>encryptFilter</filter-name>
      <filter-class>i2c.cmm.filter.EncryptFilter</filter-class>
  </filter>  
  <filter-mapping>
    <filter-name>encryptFilter</filter-name>
    <url-pattern>/smartofficeV2/*</url-pattern>
  </filter-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>/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>corsDomainFilter</filter-name>
    <filter-class>i2c.cmm.filter.CrossDomainFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>corsDomainFilter</filter-name>
    <url-pattern>*.json</url-pattern>
  </filter-mapping>   
  <filter>
    <filter-name>htmlTagFilter</filter-name>
    <filter-class>egovframework.com.cmm.filter.HTMLTagFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>htmlTagFilter</filter-name>
    <url-pattern>*.json</url-pattern>
  </filter-mapping>
  <filter-mapping>
    <filter-name>htmlTagFilter</filter-name>
    <url-pattern>*.do</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>loggingFilter</filter-name>
    <filter-class>i2c.cmm.filter.LoggingFilter</filter-class>
  </filter>
  <filter>
  	<filter-name>elasticSearchFilter</filter-name>
  	<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>loggingFilter</filter-name>
    <url-pattern>*.json</url-pattern>
  </filter-mapping>
  <filter-mapping>
  	<filter-name>elasticSearchFilter</filter-name>
    <url-pattern>*</url-pattern>
  </filter-mapping>
  
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.do</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <session-config>
    <session-timeout>300</session-timeout>
    <cookie-config>
            <http-only>true</http-only>
            <secure>true</secure>
    </cookie-config>
  </session-config>
  <error-page>
    <error-code>404</error-code>
    <location>/views/jsp/site/err/404.jsp</location>
  </error-page>
  <error-page>
    <error-code>403</error-code>
    <location>/views/jsp/site/err/403.jsp</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/views/jsp/site/err/500.jsp</location>
  </error-page> 
</web-app>