In my experience this is usually caused by line termination expansion by the
PrintWriter returned from response.getWriter(). If you buffer the data you
are going to write, for example in a ByteArrayOutputStream, then try and
write them using the writer (once Content-Length has been set), the
PrintWriter will expand any CR's it finds to CFLF and you end up overwriting
the buffer.
(*Chris*)
----- Original Message -----
From: Xavier Lopez <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 17, 1999 6:22 AM
> Hi All !!
> I have a problem with servlets:
> Sometimes I get the exception "trying to write more than content length"
> and I don't know how to solve the problem.
> Does anyone know how to do it ???
> Thank you very much
> Xavier
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html