On Wed, 22 Aug 2001 [EMAIL PROTECTED] wrote:
> Is there any way to suppress the whitespace that is output by jsp's in
> Tomcat/Catalina? I have a simple jsp that generates a .csv, and sets the
> HTTP headers so that it opens in Excel (intranet app). Even with cramming
> all the jsp intro stuff on one line, I still end up with one blank line as
> the first line of output. (actually, one newline code).
I have been using two approaches when producing output formats where extra
newlines are not allowed.
Either I leave them inside tags like...
<%@ whatever...
%><%@ whatever..
%>Here goes the first line of output
...or using comments like...
<%@ whatever... %><%--
--%><%@ whatever... %><%--
--%>Here goest the first line of output
I have to admit this is not very elegant so I would be happy to know of
any cleaner alternatives.
--
Johannes Lehtinen <[EMAIL PROTECTED]>, http://www.iki.fi/jle/