<!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     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             id="Your_WebApp_ID"
             version="2.5">
  <display-name>Archetype Created Web Application</display-name>
  <!-- Tell the server to use form-based authentication. -->
  <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
      <form-login-page>/next_book/jsp/login.jsp</form-login-page>
      <form-error-page>/next_book/jsp/login-error.jsp</form-error-page>
    </form-login-config>
  </login-config>

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

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>book_app</web-resource-name>
      <url-pattern>/next_book/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>registered-user</role-name>
      <role-name>administrator</role-name>
    </auth-constraint>
  </security-constraint>



  <security-role>
    <role-name>registered-user</role-name>
  </security-role>

  <security-role>
    <role-name>administrator</role-name>
  </security-role>


</web-app>
