posted 18 years ago
If, on the other hand, he needs the size to set the response content-length header, this size is needed before anything is written to the response. In that case all output should be to a local buffer - see java.io CharArrayWriter or ByteArrayOutputStream - finish the output, use the size to set the header, write the whole buffer at one go.
Bill