You will probably want to make any written output, however, compliant with HTML rules. That way the Java output will fit into the design of the rendered page, or at least not cause HTML parser errors.
Companion to the worldwide bestseller Core Servlets and JavaServer Pages Practical guide to the use of the Java Platform for Web-enabled applications and dynamic Web sites Focus on new capabilities: ...