12kb on the buffer. Tomcat 4.1.24 for the engine. Win2K OS. I'm led to beleive that tomcat doesn't always buffer properly, but that is just hearsay. You were looking at the top of the page, save @ include line.
This exact character sequence: <[EMAIL PROTECTED] language="java" buffer="12kb" autoFlush="false" %><%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><c:if test="{true}" ><c:redirect url="http://google.com" /></c:if> Will always fail on my system. (notice I have no newlines.) In this case, the _jsp.java file does not have a single out.write() statement, yet it still fails. It's not the c:redirect either, because <% response.sendRedirect() %> fails there as well. As far as the output goes, I like to examine the output, and it's often easier for determining that you have misdirected a form or misnamed a field. More importantly, there may be situations other than redirect where the extraneous newlines are problematic, inside a <td> tag for example. Again, nothing that can't be worked around, but good to know going in, rather than spending the 2 hours I did chasing this down. And finally, of course I have other problems!! I'm writing to this list, aren't I? R ----- Original Message ----- From: "Karr, David" <[EMAIL PROTECTED]> To: "Tag Libraries Users List" <[EMAIL PROTECTED]> Sent: Monday, June 30, 2003 1:55 PM Subject: RE: Whitespace Galore! > First of all, you will always run some risk if you try to redirect from > a JSP page. Nevertheless, if the redirect is near the top of the page > and your buffer size is of a reasonable size, you should be ok. If > you're failing, then you either have a miniscule buffer size, or your > redirect element is not near the beginning of the page (or your redirect > is in a deeply "include"d page). I wouldn't start worrying about the > white space emitted by your tags. If you have to be concerned about > that, you have other problems. > > > -----Original Message----- > > From: Rick Ross [mailto:[EMAIL PROTECTED] > > > > Hi all, > > > > I've been running into two little oddities that I thought might be > worth > > some discussion. > > > > 1. I was not able to redirect a page based on a JSTL condition tag > (c:if, > > c:choose, etc.) because the tags themselves would invariably pump some > > \r\n's into the page. This of course, caused a commit on the output > > stream > > which disallowed any redirect actions. So basically something like > > > > <c:if test="${true}"> > > <c:redirect url="otherplace.html" /> > > </c:if> > > > > Will never redirect. > > > > Now, remember that the code above is actually the same as : > > > > <c:if test="${true}">[crlf][space][space][space]<c:redirect > > url="otherplace.html" />[crlf] > > </c:if>[crlf] > > > > Even so, if leave you out the extra whitespace, like so: > > > > <c:if test="${true}"><c:redirect url="otherplace.html" /></c:if> > > > > It will still fail. taking a look at the _jsp.java file shows the > culprit. > > Very early on, a \r\n combo gets written to the output stream. > Naturally, > > I > > have buffering set and autoFlush off. > > > > Of course there are a dozen ways around this, so it's no big deal, but > I > > doubt that it is intentional and extra whitespace is my second point. > > > > 2. There is a ton of whitespace all over my output. Many many > newlines > > ... > > so many, that it is hard to examine the source of the output. I > think > > that > > most of it is in the bodies of conditionals... anyone else having > > problems? > > > > > > Rick Ross > > > > "Any sufficiently complex technology is indistinguishable > from > > garbage" > > > > > > --------------------------------------------------------------------- > > 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] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
