We will make some changes to the tags we added to configure security in the Protecting access to folders in web applications
section. Here are the changes:
- Rename role-name from admin to admin-role
- Remove the <security-role> tag
- Add the <login-config> tag
Here is what the changed declaration should look like:
<security-constraint> <display-name>Admin resources</display-name> <web-resource-collection> <web-resource-name>admins</web-resource-name> <url-pattern>/admin/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>admin-role</role-name> </auth-constraint></security-constraint><login-config> <auth-method>BASIC</auth-method> <realm-name>courseManagementJDBCRealm</realm-name> ...