Dan, I think that you may have better luck in a tag that doesn't actually extend or particularly work around the write tag, but simply filters the results of body content. That way your not just restricted to filering the content of a bean property. Markup would be like...
<mylib:nl2br> whatever <nested:write property="something" /></mylib:nl2br> ...And in this would could get the advantages of nested tags or whatever form you wanted. It also means you don't have to worry about blocking/supporting the logic of any underlying tag. The tag class itself would look like... // import whatever public class NL2BR extends BodyTagSupport { public int doAfterBody() throws JspException { if (bodyContent != null) { String filteredContent = bodyContent.getString(); // filter here... ResponseUtils.writePrevious(pageContext, filteredContent); bodyContent.clearBody(); } } } ...this should, in theory, do the trick. No properties or anything, simply filter whatever comes through in the body content. Arron. PS: get my mail the other day?... email client plays funny buggers at times, so I don't know what's sent and what's not. > ...see, I'm fading here...trial #2 > > Dan > > [WriteTag.java] > > package net.creativerge.struts.taglib.bean; > > import javax.servlet.jsp.JspException; > > import org.apache.struts.util.RequestUtils; > import org.apache.struts.util.ResponseUtils; > > public class WriteTag extends org.apache.struts.taglib.bean.WriteTag > { > protected boolean nl2br = false; > > public boolean getNl2br() > { > return nl2br; > } > > public void setNl2br(boolean nl2br) > { > this.nl2br = nl2br; > } > > public int doStartTag() throws JspException > { > // Look up the requested bean and skip if ignoring and it does not > exist if (ignore && (RequestUtils.lookup(pageContext, name, scope) > == null)) { return (SKIP_BODY); } > > // Look up the requested property value > Object value = RequestUtils.lookup(pageContext, name, property, > scope); if (value == null) { return > (SKIP_BODY); } > > // Convert value to the String with some formatting > String output = formatValue(value); > > // filter xml characters if requested > if (filter) > { > output = ResponseUtils.filter(output); > } > > // convert endlines to <br /> tags if requested > if (nl2br) > { > output = output.replaceAll("\n", "<br />"); > } > > // Print this property value to our output writer > ResponseUtils.write(pageContext, output); > > // Continue processing this page > return (SKIP_BODY); > } > } > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > Daniel Allen, <[EMAIL PROTECTED]> > http://www.mojavelinux.com/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > There is no such thing as a casual knowledge of xslt, either > you know everything about it or you are sitting in the creek. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]