Home > Contents > Index >
Template Tags TOC | Alpha TOC | Tag Family TOC | Purpose TOC | Annotated TOC | Index
ics:setvar
Sets the value of a variable.
Syntax
<ics:setvar name="variable name
" value="variable value"/>Parameters
name
(required)- Name of the variable to set.
value
(required)- Value to which to set the variable.
Description
The
ics:setvar
tag sets the value of a variable. The value of the variable exists for the duration of the page evaluation unless it is explicitly deleted usingics:removevar
. For more information about variables, see the Sites Developer's Guide.Error Numbers
There are no possible
errno
for this tag.Example
The following example sets the variable "
color
" to "red
".<ics:setvar name="color" value="red"/>The next example assumes that the variable "
color
" has been set to "red
" and appends "and blue
".<ics:setvar name="color" value="blue"/>The browser displays:
red and blueIf a variable was set by loading a file or URL and the content contains
Variables
.varname
syntax, then the variable values can be resolved by:<ics:setvar name="myvar" value="myvar"/>Any variables as part of the value of
myvar
are resolved before the value is reset.See Also
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.