Use the set tag:
<s:set var="myVar">hello</s:set>
read var with:
<s:property value="#myVar"/>
Another example:
<s:set name="personName" value="person.name"/>
Hello, <s:property value="#personName"/>. How are you?
where the person is a bean in the value stack
robsf source
share