<?xml version="1.0" encoding="UTF-8"?>

<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">

	<servlet>
		<servlet-name>yacos</servlet-name>
		<servlet-class>
			org.springframework.web.servlet.DispatcherServlet
		</servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>dwr</servlet-name>
		<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
		<init-param>
			<param-name>debug</param-name>
			<param-value>true</param-value>
		</init-param>
	</servlet>

	<servlet-mapping>
		<servlet-name>yacos</servlet-name>
		<url-pattern>*.htm</url-pattern>
	</servlet-mapping>

	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<jsp-config>
		<taglib>
			<taglib-uri>/spring</taglib-uri>
			<taglib-location>
				/WEB-INF/tld/spring-form.tld
			</taglib-location>
		</taglib>
	</jsp-config>
	
	<!-- Servlet for DWR mapping -->
	<servlet-mapping>
	  <servlet-name>yacos</servlet-name>
	  <url-pattern>/dwr/*</url-pattern>
	</servlet-mapping>
	
	<!-- Acegi Security declaration Start -->
	<filter>
       <filter-name>Acegi Filter Chain Proxy</filter-name>
       <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
       <init-param>
           <param-name>targetClass</param-name>
           <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
       </init-param>
   </filter>
   
   <filter-mapping>
   		<filter-name>Acegi Filter Chain Proxy</filter-name>
  		<url-pattern>/*</url-pattern>
  </filter-mapping>
  
  
	<!-- SiteMesh Integration declaration Start  -->
	<filter>
		<filter-name>sitemesh</filter-name>
		<filter-class>
			com.opensymphony.module.sitemesh.filter.PageFilter
		</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>sitemesh</filter-name>
		<url-pattern>/*</url-pattern> 
	</filter-mapping>
	<!-- SiteMesh Integration declaration End -->
  
  	<!-- Load Context for Acegi security -->
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContextAcegi.xml</param-value>
	</context-param>
	<!-- Acegi Security declaration End -->
	
	<!-- SessionService Integration declaration Start -->
	<filter>
		<filter-name>SessionService</filter-name>
		<filter-class>
			org.yacos.web.system.session.SessionServiceFilter
		</filter-class>
	</filter>
	
	<filter-mapping>
		<filter-name>SessionService</filter-name>
		<url-pattern>*.htm</url-pattern>
	</filter-mapping>
	<!-- SessionService Integration declaration End -->
	
	<!-- no access error -->

    <!-- page not found error -->
    <error-page>
        <error-code>404</error-code>
        <location>/WEB-INF/jsp/errors/404error.jsp</location>
    </error-page>


</web-app>