public int doEndTag ( ) throws JspException { // Trim String trimmed = truncateWS ( bodyContent . getString ( ) ) ; try { // Print trimmed content //pageContext.getOut().print("<!--TWS-->\n"); pageContext . getOut ( ) . print ( trimmed ) ; //pageContext.getOut().print("\n<!--/TWS-->"); } catch ( IOException ioe ) { throw new JspException ( ioe ) ; } return super . doEndTag ( ) ; }
doEndTag implementation truncates all whitespace .