tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Stage" <>
Subject AW: line feeds in response
Date Mon, 09 Sep 2002 13:18:14 GMT
Hi Jon,

unfortunally that is not the solution since I'm clearing the buffer just
starting the output by writing out "<?xml version="1.0" encoding="UTF-8"?>"
and as I wrote, there are no line feeds outputted by the generated servlet
source code.
I'm also 100 % percent sure that the outputstream is nowhere else used
and if I would write out some line feeds, out.clearBuffer() should throw
them out.
It also looks like out.clearBuffer() has no effect.


-----Urspr√ľngliche Nachricht-----
Von: jon wingfield []
Gesendet: Montag, 9. September 2002 13:27
An: Tomcat Users List;
Betreff: RE: line feeds in response

There are 3 linefeeds in your jsp before the code that generates the xml.
Remove them and you should be ok.
There has been a discussion on this before on this list. Search the archives

-----Original Message-----
From: Alexander Stage []
Sent: 09 September 2002 12:12
To: Tomcat Users List
Subject: line feeds in response

Hi all,

got the following problem:

I'm generating xml with jsps. Before I write out any response, I'm using
out.clearBuffer() to
clear anything from the output buffer in order not to write out new lines
However, this doesn't seem to work. I always get 3 line feeds before the xml
starts, which
causes most parsers to fail parsing that xml.
I was wondering wether this is caused by the dispatcher mechanism I'm using:

RequestDispatcher dispatcher = request.getRequestDispatcher(jspUrl);

since the resulting servlet code for the jsp begins output without any line
feeds, so this problem can't
have it's origin the jsp.

I'm running jakarta-tomcat-4.0.4-LE-jdk14 on nt 4.0.

Any help would be really appreciated.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message