<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
- <context-root>/PizzaService-war</context-root>
- <class-loader delegate="true"/>
- <jsp-config>
- <property name="keepgenerated" value="true">
- <description>Keep a copy of the generated servlet class' java code.</description>
- </property>
- </jsp-config>
+ <context-root>/PizzaService-war</context-root>
+ <security-role-mapping>
+ <role-name>admin</role-name>
+ <group-name>admin</group-name>
+ </security-role-mapping>
+ <class-loader delegate="true"/>
+ <jsp-config>
+ <property name="keepgenerated" value="true">
+ <description>Keep a copy of the generated servlet class' java code.</description>
+ </property>
+ </jsp-config>
</glassfish-web-app>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
+ <security-constraint>
+ <display-name>Constraint1</display-name>
+ <web-resource-collection>
+ <web-resource-name>admin</web-resource-name>
+ <description>Administrative Area</description>
+ <url-pattern>/faces/admin/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <description>Administrative Area Login</description>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>file</realm-name>
+ </login-config>
+ <security-role>
+ <description>Administrative role</description>
+ <role-name>admin</role-name>
+ </security-role>
</web-app>