Name

<security-role>

Synopsis

<security-role> elements are used to define the role names that the application uses.

Syntax

<security-role>
  [<description [xml:lang="lang"]>description</description>]*
  <role-name>roleName</role-name>
</security-role>

All names used in isUserInRole( ) calls, in <security-role-ref> elements and <auth-constraint> elements must be declared by a separate <security-role> element:

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

Each role must be mapped to a user and/or group in the container’s security domain in a container dependent way.

Get JavaServer Pages, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.