]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
added glassfish-specific role-group mapping and fixed URL pattern in web.xml
authorRoland Haeder <roland@mxchange.org>
Thu, 7 Apr 2016 12:23:42 +0000 (14:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 7 Apr 2016 12:23:42 +0000 (14:23 +0200)
web/WEB-INF/glassfish-web.xml
web/WEB-INF/web.xml

index eaf6448782180e7459a4c76bad9123336afbc847..84ad31352ce2f54e7aec4867cfcefde7f9f24d9c 100644 (file)
@@ -1,11 +1,15 @@
 <?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>
index 1cc23f32f58aeeb53405c89a47b3c2434b016c60..02340ff6a86025fe2628f76358ef9810b7375abb 100644 (file)
     <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>