Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 55999 invoked from network); 6 Feb 2002 08:11:56 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Feb 2002 08:11:56 -0000 Received: (qmail 23192 invoked by uid 97); 6 Feb 2002 08:11:35 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 23160 invoked by uid 97); 6 Feb 2002 08:11:34 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 23147 invoked from network); 6 Feb 2002 08:11:34 -0000 Date: Wed, 6 Feb 2002 10:11:20 +0200 Message-ID: <5784348.1012983076099.JavaMail.nobody@db-portal.office> From: Anton Brazhnyk To: Tomcat Users List Subject: RE: Strange output stream behavior Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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(""); > out.println("hello!"); > out.println("hello"); > > > 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 > > 2 > > > 22 > hello! > 2 > > > 24 > hello > 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: For additional commands: Troubles with the list: