Set Tag (Data Tag) Example

In this section, we are going to describe the Set tag.
The set tag is a generic tag that is used to assign a value to a variable in a
specified scope. It is useful when you wish to assign a variable to a complex
expression and then simply reference that variable each time rather than the
complex expression.

Now create a jsp page using <s:set>tag as shown in the setTag.jsppage. The settag is used to assign a value to a variable in a specified
scope. The parameters name and value in the tag <s:set name="technologyName" value="%{'Java'}"/>acts as the name-value pair. Here we set the parameters as
name="technologyName" value="Java".