<?xml version="1.0" encoding="UTF-8"?>
<web-app id="servlet-3_0" version="3.0"
	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/web-app_3_0.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
	
    <description/>
    <display-name>ONLWeb</display-name>
    <filter>
        <filter-name>FrontFilter</filter-name>
        <filter-class>com.eactive.eai.admin.FrontFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>FrontFilter</filter-name>
        <url-pattern>/HTT/*</url-pattern>
        <url-pattern>/WebAgent/*</url-pattern>
        <url-pattern>/adapter/*</url-pattern>
        <url-pattern>/agent/*</url-pattern>
        <url-pattern>/common/*</url-pattern>
        <url-pattern>/management/*</url-pattern>
        <url-pattern>/mgr/*</url-pattern>        
    </filter-mapping>

	<filter>
		<filter-name>ApiRequestBodyFilter</filter-name>
		<filter-class>com.eactive.eai.adapter.controller.ApiRequestBodyFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>ApiRequestBodyFilter</filter-name>
		<url-pattern>/api/*</url-pattern>
		<url-pattern>/mapi/*</url-pattern>
	</filter-mapping>

	<context-param>
        <param-name>logbackDisableServletContainerInitializer</param-name>
        <param-value>true</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>

	<!-- Weblogic 14.1.2 서블릿 설정 -->
 	<servlet>
		<servlet-name>default</servlet-name>
		<servlet-class>weblogic.servlet.FileServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>default</servlet-name>
		<url-pattern>/static/*</url-pattern>
	</servlet-mapping>

    <!-- oAuth 2.0 인증서버 설정 -->
    <servlet>
		<servlet-name>authserver</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>throwExceptionIfNoHandlerFound</param-name>
			<param-value>true</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>
	<servlet-mapping>
		<servlet-name>authserver</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>
	
	<filter>
		<filter-name>springSecurityFilterChain</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
		<init-param>
			<param-name>contextAttribute</param-name>
			<param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.authserver</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>springSecurityFilterChain</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Dynamic REST API 어댑터 설정 -->
<!--    <servlet>-->
<!--        <description/>-->
<!--        <servlet-name>RestApiDynamicInAdapter</servlet-name>-->
<!--        <servlet-class>com.eactive.eai.adapter.http.dynamic.RestApiAdapterMain</servlet-class>-->
<!--        <load-on-startup>2</load-on-startup>-->
<!--    </servlet>-->
<!--    <servlet-mapping>-->
<!--        <servlet-name>RestApiDynamicInAdapter</servlet-name>-->
<!--        <url-pattern>/API/*</url-pattern>-->
<!--        <url-pattern>/api/*</url-pattern>-->
<!--    </servlet-mapping>-->
    
<!--    
    <listener>
        <listener-class>com.eactive.eai.adapter.http.async.AppContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.eactive.eai.adapter.http.async.AppAsyncListener</listener-class>
    </listener>
-->

<!--  
    <servlet>
        <description/>
        <servlet-name>LUGroupServlet</servlet-name>
        <servlet-class>com.eactive.eai.adapter.wca.servlet.LUGroupServlet</servlet-class>
    </servlet>
    <servlet>
        <description/>
        <servlet-name>LUInfoServlet</servlet-name>
        <servlet-class>com.eactive.eai.adapter.wca.servlet.LUInfoServlet</servlet-class>
    </servlet>
    <servlet>
        <description/>
        <servlet-name>LURegisterServlet</servlet-name>
        <servlet-class>com.eactive.eai.adapter.wca.servlet.LURegisterServlet</servlet-class>
    </servlet>
-->

     <!--  
    <servlet-mapping>
        <servlet-name>LUGroupServlet</servlet-name>
        <url-pattern>/LUGroupServlet.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>LUInfoServlet</servlet-name>
        <url-pattern>/LUInfoServlet.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>LURegisterServlet</servlet-name>
        <url-pattern>/LURegisterServlet.do</url-pattern>
    </servlet-mapping>
--> 
    <servlet>
        <description/>
        <servlet-name>WebAgent</servlet-name>
        <servlet-class>com.eactive.eai.agent.web.WebAgent</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>WebAgent</servlet-name>
        <url-pattern>/WebAgent</url-pattern>
    </servlet-mapping>
   
    <servlet>
        <description/>
        <servlet-name>Dynamic</servlet-name>
        <servlet-class>com.eactive.eai.adapter.http.dynamic.HttpAdapterMain</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Dynamic</servlet-name>
        <url-pattern>/HTT/*</url-pattern>
    </servlet-mapping>
<!--     
    <servlet>
        <description/>
        <servlet-name>AsyncServlet</servlet-name>
        <servlet-class>com.eactive.eai.adapter.http.async.AsyncServlet</servlet-class>
        <init-param>
        	<param-name>com.ibm.ws.webcontainer.async-supported</param-name>
        	<param-value>true</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>AsyncServlet</servlet-name>
        <url-pattern>/AsyncServlet</url-pattern>
    </servlet-mapping>
-->    
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
        <error-code>400</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>401</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>402</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>403</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>405</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>500</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>501</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>502</error-code>
        <location>/error.jsp</location>
    </error-page>
    <error-page>
        <error-code>503</error-code>
        <location>/error.jsp</location>
    </error-page>

</web-app>