Struts2 push Tag (data tag)

Usage:
push tag is used to push value or object or property on top of the ValueStack.
When you have to do lot of work around single object properties. Then you can simply push that object on the top of ValueStack and use the properties of the object directly using the property name itself.

Attribute:
value: It is mandatory. Its type if Object. It is used to push object on the ValueStack.

Example:
<s:push value="userData">
<s:property value="id"/>
<s:property value="name"/>
<s:property value="address"/>
<s:property value="emailAddress"/>
<s:property value="mobileNumber"/>
</s:push>

Here we have pushed the userData object on the top of ValueStack.
As it is on the top of ValueStack we can easily access the properties of the userData using OGNL.
when we close the push tag then the userData object removed from the value stack.