background image

Core Tag Library

<< Tag Collaboration | Flow Control Tags >>
<< Tag Collaboration | Flow Control Tags >>

Core Tag Library

Core Tag Library
Table 7­2
summarizes the core tags, which include those related to variables and flow control,
as well as a generic way to access URL-based resources whose content can then be included or
processed within the JSP page.
TABLE 7­2
Core Tags
Area
Function
Tags
Prefix
Core
Variable support
remove
set
c
Flow control
choose
when
otherwise
forEach
forTokens
if
URL management
import
param
redirect
param
url
param
Miscellaneous
catch
out
Variable Support Tags
The set tag sets the value of an EL variable or the property of an EL variable in any of the JSP
scopes (page, request, session, or application). If the variable does not already exist, it is created.
The JSP EL variable or property can be set either from the attribute value:
<c:set var=
"foo" scope="session" value="..."/>
or from the body of the tag:
<c:set var=
"foo">
...
</c:set>
For example, the following sets an EL variable named bookID with the value of the request
parameter named Remove:
Core Tag Library
Chapter 7 · JavaServer Pages Standard Tag Library
205