One small tip on content length. If you use UTF-8 encoding, the content length of the page is not necessarily the number of characters in a string or string buffer. You have to write the data to something like a byte array output stream and then get the number of bytes.
George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 > -----Original Message----- > From: Enrique Rodriguez Lasterra [mailto:[EMAIL PROTECTED] > Sent: Monday, October 24, 2005 2:44 PM > To: Tomcat Users List > Subject: Re: content length on response > > Yes, the problem was on my servlets. they don't use setContentLength > method on the response. > > If this is tomcat default behaviour I suppose that it's > better not using > it, but, in some circunstances, some clients need this http header > variable for reading response. > > Regards, Enrique. > > > > El lun, 24-10-2005 a las 10:55 -0700, Hassan Schroeder escribió: > > Enrique Rodriguez wrote: > > > I have 9-8 tomcat with version 4.1.23 or 5.5.9. They never put > > > content-length http header variable on responses. > > > > I just grabbed a JSP page from a 5.5.9 install with LiveHTTPHeaders > > running and it shows a Content-Length header; maybe you can provide > > more detail about the circumstances where you're seeing a problem... > > > > -- from LiveHTTPHeaders ------------------------------------------- > > HTTP/1.x 200 OK > > Server: Apache-Coyote/1.1 > > Set-Cookie: JSESSIONID=239B66FD15DE288F747E131C098425E1; Path=/ > > Content-Type: text/html;charset=UTF-8 > > Content-Length: 313 > > Date: Mon, 24 Oct 2005 17:49:04 GMT > > -------------------------------------------------------------------- > > > -- > _______________________________ > Enrique Rodriguez Lasterra > lasterra AT javahispano DOT org > http://www.javahispano.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]