Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > Generic Tag Reference > property |
![]() | Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works. |
|
|
<ww:push value="myBean"> <!-- Example 1: --> <ww:property value="myBeanProperty" /> <!-- Example 2: --> <ww:property value="myBeanProperty" default="a default value" /> </ww:push> |
Example 1 prints the result of myBean's getMyBeanProperty() method. Example 2 prints the result of myBean's getMyBeanProperty() method and if it is null, print 'a default value' instead. |