16.2.6 The <ua:getAttribute/> tag
- Organization of this subsection
(1) Description
Obtains or displays the user attribute value of a logged-in user.
(2) Tag attributes
The following table lists the tag attributes.
Tag attribute |
Description |
Type |
Required? |
C/E |
---|---|---|---|---|
id="id" |
Specifies the identifier of an instance that references the user attribute value of a logged-in user. This tag attribute can also be used for the name of the script variable that references this instance. This instance has a page scope, which means that it can be referenced within the JSP page in which it is created. Therefore, the specified identifier should be unique for each page scope. If the id tag attribute is omitted, the obtained user attribute value is embedded into a JSP page by using the toString method. |
Value of the type tag attribute |
O |
C |
name="name" |
Specifies the identifier (specified with the id tag attribute) of the JAAS LoginContext object specified with the <ua:login/> tag. If an incorrect identifier is specified, the id script variable is set to null. |
n/a |
R |
E |
attrName="attrName" |
Specifies the name of the user attribute to be obtained. If that user attribute does not exist, the id script variable is set to null. |
n/a |
R |
E |
type="type" |
Specifies the class name of the attribute object to be obtained. This name should be a complete name including the package name. If the type tag attribute is omitted, java.lang.String is assumed. |
n/a |
O |
C |
- Legend:
-
R: Required
O: Optional
n/a: Not applicable
C: Indicates that the tag attribute value is evaluated at JSP compile time.
E: Indicates that the tag attribute value is evaluated at execution time.