tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Brazhnyk <a.brazh...@biconsulting.ws>
Subject RE: Strange output stream behavior
Date Wed, 06 Feb 2002 08:11:20 GMT
Hi,

> -----Original Message-----
> From: Jake.Dockter@brainna.com [mailto:Jake.Dockter@brainna.com]
> Sent: Tuesday, February 05, 2002 5:46 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Strange output stream behavior
> 
> 
> 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?
> 

Its OK, put your hair back :)
Look at header above:
Transfer-Encoding: chunked
Any browser that supports HTTP 1.1 will understand it.

> Thanks!
> -Jake
> 

Anton

--
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