This tag denotes a reference to an "edit" bean, a bean whose properties specify that certain editing be performed upon the enclosed body. The edit will be performed in the following order: String substitution, if any specified. String truncation, if any specified. Character entity escaping, if any specified. The edit bean may also be referenced by the get/set tags, resulting in the appropriate modifications to the values being get or set.
JSP
At least the id or name attribute must be specified, but not both.
This tag has the following attributes for which the Required value is “No”:
Specifies the id of the bean to create.
Specifies the name of the bean to use.
This tag provides the following bean properties for which the Type values are “Integer”, “Boolean” and Access value is “Get/Set”:
The number of characters to which to truncate the body.
A boolean that indicates whether or not to apply XML style character entity escaping to the body. The characters that will be escaped are: "<", ">", and "&".
If present, specifies that all instances of the indicated value be replaced by the value specified by the to attribute.
Specifies the string with which to replace all occurrences of the string specified by the from attribute. If to is not specified, it defaults to the null string.
<%-- truncate a mail subject line --%> <util:edit id="t1"> <util:set property="truncation" value="20"/> <util:set property="escape" value="true"/> </util:edit> ... <util:edit name="t1"> <mail:message> <mail:get property="subject"/> </mail:message> </util:edit> ... <%-- same thing, different way --%> ... <mail:get property="subject" edit ="t1"/>