Cato Førrisdahl wrote:
>>
>> Hi,
>> I have some jsp-pages which, when run, generates a lot of
>> whitespace in the resulting page. It typically looks something like:
>> ---Start---
>>
>> <?xml version="1.0"?>
>> ...
[snip]
Luc Vanlerberghe wrote:
>The whitespace is not generated by tomcat, but is present in your
>source-jsp page between the jsp tags.
[snip]
>The way I solve this, without
>giving up the readability of my page too much is by putting the closing
>bracket on the start of the next line like so:
><%@ page contentType="text/html"
>%><%@ page session="true"
>%><%@ page import="java.util.*,org.vanlerberghe.luc.spaans.*"
>%><jsp:useBean id="topicHome" type="TopicHome" scope="application"
>/><html>
>
>This way "<html>" will be the very first characters written to output.
>
[snip]
>P.s.: By the way: there is no way to let tomcat do this automatically.
>It is impossible for it to know which whitespace is needed and which
>not. In html, whitespace sometimes *does* make a difference (e.g. in a
><pre> block)
Sure, this makes sense. A little guidance, and I got it. :-)
Thank you very much for you answer, it was very helpful.
Cato Førrisdahl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]