<?xml version="1.0" encoding="ISO-8859-1"?>

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

    <description>
      JSP 2.0 Examples.
    </description>
    <display-name>JSP 2.0 Examples</display-name>


    <!-- Define servlet-mapped and path-mapped example filters -->
    <filter>
        <filter-name>Servlet Mapped Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
	<init-param>
	    <param-name>attribute</param-name>
	    <param-value>filters.ExampleFilter.SERVLET_MAPPED</param-value>
	</init-param>
    </filter>
    <filter>
        <filter-name>Path Mapped Filter</filter-name>
        <filter-class>filters.ExampleFilter</filter-class>
	<init-param>
	    <param-name>attribute</param-name>
	    <param-value>filters.ExampleFilter.PATH_MAPPED</param-value>
	</init-param>
    </filter>
    <filter>
        <filter-name>Request Dumper Filter</filter-name>
        <filter-class>filters.RequestDumperFilter</filter-class>
    </filter>

    <!-- Example filter to set character encoding on each request -->
    <filter>
        <filter-name>Set Character Encoding</filter-name>
        <filter-class>filters.SetCharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>EUC_JP</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>Compression Filter</filter-name>
        <filter-class>compressionFilters.CompressionFilter</filter-class>

        <init-param>
          <param-name>compressionThreshold</param-name>
          <param-value>10</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
    </filter>

<!-- Example filter mapping to apply the "Set Character Encoding" filter
     to *all* requests processed by this web application -->
<!--
    <filter-mapping>
        <filter-name>Set Character Encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
      <filter-name>Compression Filter</filter-name>
      <url-pattern>/CompressionTest</url-pattern>
    </filter-mapping>
-->

<!--
    <filter-mapping>
        <filter-name>Request Dumper Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
-->

    <!-- Define example application events listeners -->
    <listener>
        <listener-class>listeners.ContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>listeners.SessionListener</listener-class>
    </listener>

    <!-- Define servlets that are included in the example application -->

    <servlet>
      <servlet-name>
          servletToJsp
      </servlet-name>
      <servlet-class>
          servletToJsp
      </servlet-class>
    </servlet>

    <servlet>
        <servlet-name>
            CompressionFilterTestServlet
        </servlet-name>
        <servlet-class>
            compressionFilters.CompressionFilterTestServlet
        </servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>
            CompressionFilterTestServlet
        </servlet-name>
        <url-pattern>
            /CompressionTest
        </url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>
            servletToJsp
        </servlet-name>
        <url-pattern>
            /servletToJsp
        </url-pattern>
    </servlet-mapping>

    <jsp-config>
        <taglib>
	    <taglib-uri>
	       http://jakarta.apache.org/tomcat/debug-taglib
	    </taglib-uri>
	    <taglib-location>
	       /WEB-INF/jsp/debug-taglib.tld
	    </taglib-location>
	</taglib>

	<taglib>
	    <taglib-uri>
	       http://jakarta.apache.org/tomcat/examples-taglib
	    </taglib-uri>
	    <taglib-location>
	       /WEB-INF/jsp/example-taglib.tld
	    </taglib-location>
	</taglib>

	<taglib>
	    <taglib-uri>
	       http://jakarta.apache.org/tomcat/jsp2-example-taglib
	    </taglib-uri>
	    <taglib-location>
	       /WEB-INF/jsp2/jsp2-example-taglib.tld
	    </taglib-location>
	</taglib>

	<jsp-property-group>
	    <description>
		Special property group for JSP Configuration JSP example.
	    </description>
	    <display-name>JSPConfiguration</display-name>
	    <url-pattern>/jsp2/misc/config.jsp</url-pattern>
	    <el-ignored>true</el-ignored>
	    <page-encoding>ISO-8859-1</page-encoding>
	    <scripting-invalid>true</scripting-invalid>
	    <include-prelude>/jsp2/misc/prelude.jspf</include-prelude>
	    <include-coda>/jsp2/misc/coda.jspf</include-coda>
	</jsp-property-group>
    </jsp-config>
    
   <security-constraint>
      <display-name>Example Security Constraint</display-name>
      <web-resource-collection>
         <web-resource-name>Protected Area</web-resource-name>
	 <!-- Define the context-relative URL(s) to be protected -->
         <url-pattern>/security/protected/*</url-pattern>
	 <!-- If you list http methods, only those methods are protected -->
	 <http-method>DELETE</http-method>
         <http-method>GET</http-method>
         <http-method>POST</http-method>
	 <http-method>PUT</http-method>
      </web-resource-collection>
      <auth-constraint>
         <!-- Anyone with one of the listed roles may access this area -->
         <role-name>tomcat</role-name>
	 <role-name>role1</role-name>
      </auth-constraint>
    </security-constraint>

    <!-- Default login configuration uses form-based authentication -->
    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>Example Form-Based Authentication Area</realm-name>
      <form-login-config>
        <form-login-page>/security/protected/login.jsp</form-login-page>
        <form-error-page>/security/protected/error.jsp</form-error-page>
      </form-login-config>
    </login-config>
        
    <!-- Security roles referenced by this web application -->
    <security-role>
      <role-name>role1</role-name>
    </security-role>
    <security-role>
      <role-name>tomcat</role-name>
    </security-role>    

    <!-- Environment entry examples -->
    <!--env-entry>
      <env-entry-description>
         The maximum number of tax exemptions allowed to be set.
      </env-entry-description>
      <env-entry-name>maxExemptions</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>15</env-entry-value>
    </env-entry-->
    <env-entry>
      <env-entry-name>minExemptions</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name1</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>value1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/bar/name2</env-entry-name>
      <env-entry-type>java.lang.Boolean</env-entry-type>
      <env-entry-value>true</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>name3</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>1</env-entry-value>
    </env-entry>
    <env-entry>
      <env-entry-name>foo/name4</env-entry-name>
      <env-entry-type>java.lang.Integer</env-entry-type>
      <env-entry-value>10</env-entry-value>
    </env-entry>

</web-app>
