This tag retrieves the specified property and writes its value to the page output.
Empty
If the name attribute is not specified then uses a parent bean tag to locate the bean on which to operate. The property attribute should be used to specify what to retrieve; if not specified then the bean object itself is retrieved as a string. The id attribute specifies the name to save the retrieved property as; useful for non-string properties. If the eval attribute is specified then the value of the attribute is evaluated and written to the page output; this replaces the bean processing described above.
This tag has the following attributes for which the Required value are “Yes” and “No”:
Name of the bean to use.
Name of the property to retrieve. If not specified then the bean itself is retrieve as a string.
Name to save the retrieved value as.
Attribute to evaluate and write to page output.
Specifies the edit bean that will be applied to the returned value.
None.
<%-- get the date time property from parent bean --%> <util:bean type="java.util.Date"> time = <util:get property="time"/> </util:bean> <%-- get the date time property from named bean --%> <util:bean id="date" type="java.util.Date"/> ... time = <util:get name="date" property="time"/> <%-- get the date bean itself as a string --%> <util:bean type="java.util.Date"> date = <util:get/> </util:bean> <%-- get a non-string bean property --%> <util:bean: type="Bean"> <util:get property="prop" id="handle"/> </util:bean> <%-- get an evaluated attribute --%> <util:catalog id="catalog" resource="catalog"/> <util:bean id="bean" type="java.util.Date"/> Msg = <util:get eval="$[catalog:msg]"/> Param = <util:get eval="$(requestparam)"/> Bean = <util:get eval="{bean}"/>