| 1 |
<web-app |
| 2 |
xmlns="http://java.sun.com/xml/ns/javaee" |
| 3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
| 5 |
version="2.5"> |
| 6 |
|
| 7 |
<display-name>EE10 Demo JAAS WebApp</display-name> |
| 8 |
|
| 9 |
<welcome-file-list> |
| 10 |
<welcome-file>index.html</welcome-file> |
| 11 |
</welcome-file-list> |
| 12 |
|
| 13 |
|
| 14 |
<security-constraint> |
| 15 |
<web-resource-collection> |
| 16 |
<web-resource-name>JAAS Role</web-resource-name> |
| 17 |
<url-pattern>/auth.html</url-pattern> |
| 18 |
</web-resource-collection> |
| 19 |
<auth-constraint> |
| 20 |
<role-name>roleA</role-name> |
| 21 |
</auth-constraint> |
| 22 |
</security-constraint> |
| 23 |
|
| 24 |
|
| 25 |
<login-config> |
| 26 |
<auth-method>FORM</auth-method> |
| 27 |
<realm-name>Test JAAS Realm</realm-name> |
| 28 |
<form-login-config> |
| 29 |
<form-login-page> |
| 30 |
/login.html |
| 31 |
</form-login-page> |
| 32 |
<form-error-page> |
| 33 |
/authfail.html |
| 34 |
</form-error-page> |
| 35 |
</form-login-config> |
| 36 |
</login-config> |
| 37 |
|
| 38 |
<security-role> |
| 39 |
<role-name>roleA</role-name> |
| 40 |
</security-role> |
| 41 |
</web-app> |