<?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_5.xsd" 
   metadata-complete="false"
   version="2.5"> 

  <display-name>Test Annotations WebApp</display-name>
  
  <listener>
    <listener-class>com.acme.TestListener</listener-class>
  </listener>


  <servlet>
    <servlet-name>AnnotationTest</servlet-name>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>AnnotationTest</servlet-name>
    <url-pattern>/test/*</url-pattern>
  </servlet-mapping>
  
  <servlet>
    <servlet-name>RoleAnnotationTest</servlet-name>
    <servlet-class>com.acme.RoleAnnotationTest</servlet-class>
    <load-on-startup>1</load-on-startup>
    <security-role-ref>
      <role-name>manager</role-name>
      <role-link>server-administrator</role-link>
    </security-role-ref>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>RoleAnnotationTest</servlet-name>
    <url-pattern>/role/*</url-pattern>
  </servlet-mapping>
  
  <servlet>
    <servlet-name>Multi</servlet-name>
    <servlet-class>com.acme.MultiPartTest</servlet-class>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>Multi</servlet-name>
    <url-pattern>/multi/*</url-pattern>
  </servlet-mapping>

  <env-entry>
    <env-entry-name>com.acme.AnnotationTest/avgAmount</env-entry-name>
    <env-entry-value>1.25</env-entry-value>
    <env-entry-type>java.lang.Double</env-entry-type>
  </env-entry>

  <env-entry>
    <env-entry-name>someAmount</env-entry-name>
    <env-entry-value>0.99</env-entry-value>
    <env-entry-type>java.lang.Double</env-entry-type>
  </env-entry>

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Admin Role</web-resource-name>
      <url-pattern>/role/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>

  <security-role>
    <role-name>admin</role-name>
  </security-role>


<!--
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Test Realm</realm-name>
  </login-config>
-->

  <login-config>
    <auth-method>FORM</auth-method>
    <realm-name>Test Realm</realm-name>
    <form-login-config>
      <form-login-page>
        /login.html
      </form-login-page>
      <form-error-page>
        /authfail.html
      </form-error-page>
    </form-login-config>
  </login-config>


</web-app>
