The set tag updates the specified property.
JSP
If the name attribute is not specified then uses a parent bean tag to locate the bean on which to operate. The property specifies what to update. The value attribute specifies the string value to update the property; the id attribute specifies the bean object value to update the property. Either value or id must be specified.
The tag has the following attributes for which the Required values are “Yes” and “No”:
Name of the bean to use.
Name of the property to update.
String value of the property to update.
Bean object value of the property to update.
Specifies the edit bean that will be applied to value prior to storage.
None.
<%-- set the date time property on parent bean --%> <util:bean type="java.util.Date"> <util:set property="time" value="0"/> </util:bean> <%-- set the date time property on named bean --%> <util:bean id="date" type="java.util.Date"/> ... <util:set name="date" property="time" value="0"/> <%-- set a bean onto another bean property --%> <util:bean id="one" type="BeanOne"/> <util:bean id="two" type="Beantwo"/> <util:set name="two" id="one" property="one"/>