On Sat, 23 Nov 2002, Peter Lin wrote:
> Date: Sat, 23 Nov 2002 20:25:52 -0800 (PST) > From: Peter Lin <[EMAIL PROTECTED]> > Reply-To: Tomcat Developers List <[EMAIL PROTECTED]> > To: Tomcat Developers List <[EMAIL PROTECTED]> > Subject: RE: [Jasper2] framework for tag optimization > > > > I sent the suggestion a while back to the expert group. > > AFAIK, the and other tags don't actually generate *any* output > > of their own -- the extra line breaks you are seeing are undoubtedly those > > you've put in the source JSP page itself. > > > Yes, I was referring to the spaces that are generated by jasper because my original >JSP source has: > > <c:choose> The carriage return right here (after <c:choose>) is part of your template text, and will therefore be rendered to the output. It is *not* rendered by the <c:choose> tag itself. You can verify this by reviewing the source code for the JSTL reference implementation (i.e. the "standard" project in jakarta-taglibs), and you'll see that the tags themselves do not render anything -- they only decide whether or not to render their bodies. > <c:when></c:when> Same here. > <c:otherwise></c:otherwise> And here. > </c:choose> > And here. One textual approach to minimizing the extra newlines (I would not recommend this -- they don't bother me, but they might bother you): <c:choose><c:when> ... </c:when><c:when> ... </c:when><c:otherwise> ... </c:otherwise></c:choose> Craig -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>