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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to