Hi, > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 05, 2002 5:46 PM > To: [EMAIL PROTECTED] > 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:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>