<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
   <description>WebApp Integration Tests</description>

<!-- ### Servlets -->
    <servlet>
        <servlet-name>APIServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.APIServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ClasspathServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.ClasspathServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>ENCServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.ENCServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>EJBServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.EJBServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>EntityServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.EntityServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>StatefulSessionServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.StatefulSessionServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>UserTransactionServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.UserTransactionServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>ClientLoginServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.ClientLoginServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>EJBOnStartupServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.EJBOnStartupServlet</servlet-class>
        <init-param>
            <param-name>failOnError</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>DebugServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.DebugServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>IncludeServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.IncludeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SecureIncludeServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.IncludeServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SecureServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.SecureServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SecureEJBServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.SecureEJBServlet</servlet-class>
    </servlet>
   <servlet>
       <servlet-name>UnsecureEJBServlet</servlet-name>
       <servlet-class>org.jboss.test.web.servlets.UnsecureEJBServlet</servlet-class>
   </servlet>
   <servlet>
       <servlet-name>UnsecureRunAsServlet</servlet-name>
       <servlet-class>org.jboss.test.web.servlets.UnsecureEJBServlet</servlet-class>
      <run-as>
         <description>Assume an InternalUser role to access a private EJB</description>
         <role-name>InternalUser</role-name>
      </run-as>
   </servlet>
    <servlet>
        <servlet-name>SecureEJBServletMT</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.SecureEJBServletMT</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SpeedServlet</servlet-name>
        <servlet-class>org.jboss.test.web.servlets.SpeedServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>snoop</servlet-name>
        <jsp-file>/snoop.jsp</jsp-file>
    </servlet>
    <servlet>
        <servlet-name>classpath</servlet-name>
        <jsp-file>/classpath.jsp</jsp-file>
    </servlet>
    <servlet>
        <servlet-name>restricted/include_ejb.jsp</servlet-name>
        <jsp-file>/restricted/include_ejb.jsp</jsp-file>
    </servlet>
    <servlet>
        <servlet-name>restricted/ejb.jsp</servlet-name>
        <jsp-file>/restricted/ejb.jsp</jsp-file>
    </servlet>

<!-- The servlet and jsp page mappings -->
    <servlet-mapping>
        <servlet-name>APIServlet</servlet-name>
        <url-pattern>/APIServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ClasspathServlet</servlet-name>
        <url-pattern>/ClasspathServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ENCServlet</servlet-name>
        <url-pattern>/ENCServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>DebugServlet</servlet-name>
        <url-pattern>/DebugServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>EJBServlet</servlet-name>
        <url-pattern>/EJBServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>EntityServlet</servlet-name>
        <url-pattern>/EntityServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>StatefulSessionServlet</servlet-name>
        <url-pattern>/StatefulSessionServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>UserTransactionServlet</servlet-name>
        <url-pattern>/UserTransactionServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>EJBOnStartupServlet</servlet-name>
        <url-pattern>/EJBOnStartupServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ClientLoginServlet</servlet-name>
        <url-pattern>/ClientLoginServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>IncludeServlet</servlet-name>
        <url-pattern>/IncludeServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SecureIncludeServlet</servlet-name>
        <url-pattern>/restricted/IncludeServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SecureServlet</servlet-name>
        <url-pattern>/restricted/SecureServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SecureEJBServlet</servlet-name>
        <url-pattern>/restricted/SecureEJBAccess</url-pattern>
    </servlet-mapping>
   <servlet-mapping>
       <servlet-name>UnsecureEJBServlet</servlet-name>
       <url-pattern>/UnsecureEJBAccess</url-pattern>
   </servlet-mapping>
   <servlet-mapping>
       <servlet-name>UnsecureRunAsServlet</servlet-name>
       <url-pattern>/UnsecureRunAsServlet</url-pattern>
   </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SecureEJBServletMT</servlet-name>
        <url-pattern>/restricted/SecureEJBAccessMT</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SpeedServlet</servlet-name>
        <url-pattern>/SpeedServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>snoop</servlet-name>
        <url-pattern>*.snp</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>snoop</servlet-name>
        <url-pattern>/test-jsp-mapping</url-pattern>
    </servlet-mapping>

    <!-- The Welcome File List -->
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>

<!-- ### Resources -->
    <!-- JDBC DataSources (java:comp/env/jdbc) -->
    <resource-ref>
        <description>The default DS</description>
        <res-ref-name>jdbc/DefaultDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <!-- JavaMail Connection Factories (java:comp/env/mail) -->
    <resource-ref>
        <description>Default Mail</description>
        <res-ref-name>mail/DefaultMail</res-ref-name>
        <res-type>javax.mail.Session</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <!-- JMS Connection Factories (java:comp/env/jms) -->
    <resource-ref>
        <description>Default QueueFactory</description>
        <res-ref-name>jms/QueFactory</res-ref-name>
        <res-type>javax.jms.QueueConnectionFactory</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
    <!-- URL Connection Factories (java:comp/env/url) -->
    <resource-ref>
        <description>JBoss Home Page</description>
        <res-ref-name>url/JBossHome</res-ref-name>
        <res-type>java.net.URL</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

<!-- ### Security -->
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Restricted</web-resource-name>
            <description>Declarative security tests</description>
            <url-pattern>/restricted/*</url-pattern>
            <http-method>HEAD</http-method>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
            <http-method>PUT</http-method>
            <http-method>DELETE</http-method>
        </web-resource-collection>
        <auth-constraint>
            <description>Only authenticated users can access secure content</description>
            <role-name>AuthorizedUser</role-name>
        </auth-constraint>
        <user-data-constraint>
            <description>no description</description>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>JBossTest Servlets</realm-name>
    </login-config>

   <security-role>
       <description>An AuthorizedUser is one with a valid username and password</description>
       <role-name>AuthorizedUser</role-name>
   </security-role>
   <security-role>
       <description>InternalUser is private app role</description>
       <role-name>InternalUser</role-name>
   </security-role>

<!-- ### Environment (java:comp/env/ejb) -->
    <env-entry>
        <description>Integer0</description>
        <env-entry-name>Ints/i0</env-entry-name>
        <env-entry-value>0</env-entry-value>
        <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry>
    <env-entry>
        <description>Integer1</description>
        <env-entry-name>Ints/i1</env-entry-name>
        <env-entry-value>1</env-entry-value>
        <env-entry-type>java.lang.Integer</env-entry-type>
    </env-entry>
    <env-entry>
        <description>Float0</description>
        <env-entry-name>Floats/f0</env-entry-name>
        <env-entry-value>0.0</env-entry-value>
        <env-entry-type>java.lang.Float</env-entry-type>
    </env-entry>
    <env-entry>
        <description>Float1</description>
        <env-entry-name>Floats/f1</env-entry-name>
        <env-entry-value>1.1</env-entry-value>
        <env-entry-type>java.lang.Float</env-entry-type>
    </env-entry>
    <env-entry>
        <description>String0</description>
        <env-entry-name>Strings/s0</env-entry-name>
        <env-entry-value>String0</env-entry-value>
        <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <env-entry>
        <description>String1</description>
        <env-entry-name>Strings/s1</env-entry-name>
        <env-entry-value>String1</env-entry-value>
        <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
   <env-entry>
      <env-entry-name>ejb/catalog/CatalogDAOClass</env-entry-name>
      <env-entry-value>com.sun.model.dao.CatalogDAOImpl</env-entry-value>
      <env-entry-type>java.lang.String</env-entry-type>
   </env-entry>

<!-- ### EJB References (java:comp/env/ejb) -->
    <!-- An ejb-ref that has no corresponding ejb-ref in jboss-web.xml -->
    <ejb-ref>
        <ejb-ref-name>ejb/bean0</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>ENCBean0</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/bean1</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>ENCBean1</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/bean2</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>ENCBean1</ejb-link>
    </ejb-ref>
    <!-- ejb-ref that needs jboss-web.xml                            -->
    <ejb-ref>
        <ejb-ref-name>ejb/bean3</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/Entity</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.EntityHome</home>
        <remote>org.jboss.test.web.interfaces.Entity</remote>
        <ejb-link>Entity</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/OptimizedEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>OptimizedEJB</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/NotOptimizedEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>NotOptimizedEJB</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/CtsBmp</ejb-ref-name>
        <ejb-ref-type>Entity</ejb-ref-type>
        <home>org.jboss.test.cts.interfaces.CtsBmpHome</home>
        <remote>org.jboss.test.cts.interfaces.CtsBmp</remote>
        <ejb-link>BMPBean</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/SecuredEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>SecuredEJB</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/UnsecuredEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>UnsecuredEJB</ejb-link>
    </ejb-ref>
    <ejb-ref>
        <ejb-ref-name>ejb/StatefulEJB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>StatefulEJB</ejb-link>
    </ejb-ref>
    <!-- A relative ejb-ref -->
    <ejb-ref>
        <ejb-ref-name>ejb/RelativeBean</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <home>org.jboss.test.web.interfaces.StatelessSessionHome</home>
        <remote>org.jboss.test.web.interfaces.StatelessSession</remote>
        <ejb-link>websubdir/relative.jar#SessionBean</ejb-link>
    </ejb-ref>

   <ejb-local-ref>
      <ejb-ref-name>ejb/local/bean0</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
      <ejb-link>ENCBean0</ejb-link>
   </ejb-local-ref>
   <ejb-local-ref>
      <ejb-ref-name>ejb/local/bean1</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
      <ejb-link>ENCBean1</ejb-link>
   </ejb-local-ref>
    <!-- ejb-local-ref that needs jboss-web.xml                            -->
   <ejb-local-ref>
      <ejb-ref-name>ejb/local/bean3</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
   </ejb-local-ref>

   <ejb-local-ref>
      <ejb-ref-name>ejb/local/OptimizedEJB</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
      <ejb-link>jbosstest-web-ejbs.jar#OptimizedEJB</ejb-link>
   </ejb-local-ref>
   <ejb-local-ref>
      <ejb-ref-name>ejb/local/SecuredEJB</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
      <ejb-link>SecuredEJB</ejb-link>
   </ejb-local-ref>
    <!-- A relative ejb-local-ref -->
   <ejb-local-ref>
      <ejb-ref-name>ejb/local/RelativeBean</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>org.jboss.test.web.interfaces.StatelessSessionLocalHome</local-home>
      <local>org.jboss.test.web.interfaces.StatelessSessionLocal</local>
      <ejb-link>websubdir/relative.jar#SessionBean</ejb-link>
   </ejb-local-ref>
</web-app>
