Are the println() calls in a few of the taglib classes (e.g. Checkbox,
Html, Multibox, RadioTag) really necessary, or could these be print()s?
Or rather, would they be =better= as print()s?

Most of the time it doesn't matter, but with the checkbox tag, for
example, most browsers interpret the inserted carriage return as
whitespace and insert a space between the checkbox and its label. If
spacing is tight, they sometimes even break the line before the label.

While this behaviour may in fact be erroneous, all the main browsers do
it, so we have to live with it. And regardless, I would suggest that
generated code should not add any additional spacing or carriage
returns, as even if you wanted to read the generated output, it's likely
the coder would have put line breaks where appropriate anyway.

--
Michael Hackett
Developer, Pictorius Inc.

Reply via email to