<?xml version="1.0"?>
<!--
/**********************************************************************************
 * $URL:  $
 * $Id:  $
 ***********************************************************************************
 *
 * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
 *
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.opensource.org/licenses/ecl1.php
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 **********************************************************************************/
-->
<web-app id="RWikiTool" 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">
	<display-name>sakai-search</display-name>
	<description>Sakai Search</description>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/components.xml</param-value>
	</context-param>
	
	<!-- 
	Tool registration, 
	requires that the tool definition in in tool
	-->
	<listener>
		<listener-class>org.sakaiproject.util.ToolListener</listener-class>
	</listener>
	
	<listener>
		<listener-class>
			org.sakaiproject.util.ContextLoaderListener</listener-class>
	</listener>
	
	<!-- 
	The Sakai Request Hander 
	-->
	<filter>
		<filter-name>sakai.request</filter-name>
		<filter-class>org.sakaiproject.util.RequestFilter</filter-class>
	</filter>
	
	<!--
	Mapped onto the Search Handler
	-->
	<filter-mapping>
		<filter-name>sakai.request</filter-name>
		<servlet-name>sakai.search</servlet-name>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
	
	<!--
	The Search Controller 
	-->
	<servlet>
		<servlet-name>sakai.search</servlet-name>
		<servlet-class>
			org.sakaiproject.search.tool.ControllerServlet
		</servlet-class>
		<load-on-startup>100</load-on-startup>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>sakai.search</servlet-name>
		<url-pattern>/search/*</url-pattern>
	</servlet-mapping>
	<error-page>
		<exception-type>java.lang.Exception</exception-type>
		<location>/WEB-INF/command-pages/errorpage.jsp</location>
	</error-page>
	<error-page>
		<exception-type>java.lang.RuntimeException</exception-type>
		<location>/WEB-INF/command-pages/errorpage.jsp</location>
	</error-page>
	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
	</welcome-file-list>
	
</web-app>
