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

<web-app 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"
	version="2.4">

    <display-name>OpenCms</display-name>
    
    <description>
        OpenCms, the Open Source Content Management System. 
        (c) 2005 Alkacon Software GmbH with contributions from the OpenCms community.
        For more details about OpenCms, please see http://www.opencms.org/.
        For more details about Alkacon Software GmbH, please see http://www.alkacon.com/.    
    </description>

    <!--
        Changing the servlet name from "opencms" to something else requires 2 changes in this file.        
        For example, to change the servlet name to "mycms" you must:
        
        1. Change the <context-param> called "OpenCmsServlet" from "/opencms/*" to "/mycms/*"
        2. Change the <servlet-mapping> for "OpenCmsServlet" from "/opencms/*" to "/mycms/*"
    -->
    
    <!--
	    Changing the errorhandler servlet name from "opencms-errorhandler" to something
		else requires 3 changes in this file.
		For example, to change the servlet name to "mycms-errorhandler" you must:

		1. Change the <servlet-mapping> for "OpenCmsServletErrorHandler" from
		   "/opencms-errorhandler/*" to "/mycms-errorhandler/*"
		2. Change the <error-page> setting for the 404 error from
		   "/opencms-errorhandler/handle404" to "/mycms-errorhandler/handle404"
		3. Change the <error-page> setting for the 500 error from
	       "/opencms-errorhandler/system/handler/handle500.html" to
	       "/mycms-errorhandler/system/handler/handle500.html"
    -->

    <context-param>
        <param-name>OpenCmsServlet</param-name>
        <param-value>/opencms/*</param-value>
    </context-param>
    
    <context-param>
        <param-name>DefaultWebApplication</param-name>
        <param-value>ROOT</param-value>
    </context-param>    
    
	<!-- 
	    Uncomment this parameter in case you change the web application context using an application server 
	    specific deployment descriptor. E.g. in Jboss, you could use the jboss-web.xml file to deploy opencms under the
	    context 'myopencms' but still keep the files in the folder 'opencms.war'

    <context-param>
        <param-name>WebApplicationContext</param-name>
        <param-value>myopencms</param-value>
    </context-param>
    -->

    <listener>
        <listener-class>org.opencms.main.OpenCmsListener</listener-class>
    </listener>
        
    <servlet>
        <description>
            The main servlet that handles all requests to the OpenCms VFS.  
        </description>
        <servlet-name>OpenCmsServlet</servlet-name>
        <servlet-class>org.opencms.main.OpenCmsServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    
    <servlet>
        <description>
            The error handling servlet, also servers as trigger for static export requests.  
        </description>
        <servlet-name>OpenCmsServletErrorHandler</servlet-name>
        <servlet-class>org.opencms.main.OpenCmsServletErrorHandler</servlet-class>
        <load-on-startup>0</load-on-startup>
    </servlet>    

    <servlet>
        <description>
            Creates an access to OpenCms through WebDAV.
        </description>
        <servlet-name>OpenCmsWebDavServlet</servlet-name>
        <servlet-class>org.opencms.webdav.CmsWebdavServlet</servlet-class>
        <init-param>
          <param-name>listings</param-name>
          <param-value>true</param-value>
        </init-param>
        <init-param>
          <param-name>readonly</param-name>
          <param-value>false</param-value>
        </init-param>
        <init-param>
          <param-name>repository</param-name>
          <param-value>standard</param-value>
        </init-param>
    </servlet>
    
    <servlet-mapping>
        <servlet-name>OpenCmsServlet</servlet-name>
        <url-pattern>/opencms/*</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
        <servlet-name>OpenCmsServletErrorHandler</servlet-name>
        <url-pattern>/opencms-errorhandler/*</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
      <servlet-name>OpenCmsWebDavServlet</servlet-name>
      <url-pattern>/webdav/*</url-pattern>
    </servlet-mapping>
    
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index_export.html</welcome-file>
    </welcome-file-list>
    
    <error-page>
        <error-code>404</error-code>
        <location>/opencms-errorhandler/handle404</location>
    </error-page>

	<error-page>
        <error-code>500</error-code>
        <location>/opencms-errorhandler/system/handler/handle500.html</location>
    </error-page>

	<jsp-config>
	    <taglib>
	        <taglib-uri>http://www.opencms.org/taglib/cms</taglib-uri>
	        <taglib-location>/WEB-INF/opencms.tld</taglib-location>
	    </taglib>
	</jsp-config>

</web-app>