Struts2 property Tag (data tag)
Usage:
property tag provides a convenient and easy way for displaying data into the rendering HTML page.
Attributes:
value: Its type is object. It is not mandatory. It is used to display value of any object.
default: Its type if String. It is not mandatory. It is used to display any default value if the value is null.
escape: Its type is boolean. It is not mandatory. It is used to escape HTML.
Syntax:
<s:property value="user.name" default="milky_way" escape="true" />
It will display the name property of the user object available on the ValueStack.
If the name is null for the user object then it will display milky_way instead of null value.
if name contains the html specific value then it will escape the html.
property tag provides a convenient and easy way for displaying data into the rendering HTML page.
Attributes:
value: Its type is object. It is not mandatory. It is used to display value of any object.
default: Its type if String. It is not mandatory. It is used to display any default value if the value is null.
escape: Its type is boolean. It is not mandatory. It is used to escape HTML.
Syntax:
<s:property value="user.name" default="milky_way" escape="true" />
It will display the name property of the user object available on the ValueStack.
If the name is null for the user object then it will display milky_way instead of null value.
if name contains the html specific value then it will escape the html.