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
etc.
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);
dispatcher.forward(request,response);
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. The generated source
code is:
// begin [file="/includeHeader.jsp";from=(0,2);to=(0,15)]
out.clearBuffer();
// end
// HTML // begin [file="/includeHeader.jsp";from=(0,17);to=(1,0)]
out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
I tried to use also the clear() method in the out object, also reset(),
resetBuffer() in HttpServletResponse,
with the same results. The line feeds are always outputted before the "<?xml
version=\"1.0\" encoding=\"UTF-8\"?>\n" String.
I'm running jakarta-tomcat-4.0.4-LE-jdk14 on nt 4.0.
Any help would be really, really appreciated.
Thanks
Alex
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>