tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake.Dock...@brainna.com
Subject Strange output stream behavior
Date Tue, 05 Feb 2002 15:45:59 GMT
Hi all,
I'm seeing something strange in the output stream from Jakarta.  Here's the
setup:
Jakarta 4.0.1 (from zip file)
Windows XP Professional
JDK 1.3.1_02 and jsdk1.4rc (makes no difference in the output)

Here's the code I'm using:

        res.setContentType("text/html");

        PrintWriter out = res.getWriter();

        out.println("<HTML>");
        out.println("<HEAD><TITLE>hello!</TITLE></HEAD>");
        out.println("<BODY><BIG>hello</BIG></BODY></HTML>");


and here's the output:
***********************************************************************************************
HTTP/1.1 200 OK
Content-Type: text/html
Date: Tue, 05 Feb 2002 14:44:37 GMT
Transfer-Encoding: chunked
Server: Apache Tomcat/4.0.1 (HTTP/1.1 Connector)

6
<HTML>
2


22
<HEAD><TITLE>hello!</TITLE></HEAD>
2


24
<BODY><BIG>hello</BIG></BODY></HTML>
2


0
**********************************************************************************************

It looks like every call to println() is putting characters before and
after.  This also happens with the write() and println() methods on the
servletoutputstream.  Is this correct?  The strangest thing is that IE
(6.0) displays the html correctly, and a view source has the extra numbers
stripped out.

I'm pulling my hair out trying to figure this one out, can anyone point me
in the correct direction?

Thanks!
-Jake


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message