tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Turau <tu...@pcsrv1.informatik.fh-wiesbaden.de>
Subject Re: Strange output stream behavior
Date Wed, 06 Feb 2002 11:51:16 GMT
Hi,

that is correct behaviour, because Tomcat uses chunked transfer encoding.
The browser interpretes these extra characters and displays only the
content.


volker turau
FH Wiesbaden Fachbereich Informatik
Tel.: +49-611-9495-205 FAX +49-611-9495-210
http://www.informatik.fh-wiesbaden.de/~turau

On Tue, 5 Feb 2002 Jake.Dockter@brainna.com wrote:

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


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