Name
Variable Directive
Synopsis
This directive can be used only in tag files. It declares variables exposed by the tag file to the page where the corresponding custom action is used.
Syntax
<%@ variable name-given="attrAndVarName
" | name-from-attribute="attrName
" alias="varName
" [declare="true
|false"] [description="description
"] [scope="AT_BEGIN|AT_END|NESTED
"] [variable-class="varType
"] %>
Attributes
Attribute Name |
Default |
Description |
alias |
No default |
The name of the local page scope variable the tag file uses to hold
the value it creates. The container copies the value of the local
variable to the variable in the invoking page’s page
scope named by the attribute specified by the
|
declare |
true |
Set to |
description |
No default |
A description of the variable that can be displayed by a page-authoring tool. |
name-from-attribute |
No default |
The name of the attribute that specifies the variable to hold the
value created by the tag file. This attribute must be used in
combination with the |
name-given |
No default |
The name of the variable in the invoking page’s page
scope the tag file uses to expose the value it creates. This
attribute must not be used with the
|
scope |
NESTED |
The visibility of the variable, one of |
variable-class ... |
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.