> What I do is build the response in a string instead of writing it to the
buffer.

Interesting.  The string serves as a pseudo buffer which expands in length
as required.  Very cool.  To use this approach one would have to be dealing
directly with a servlet, right?  IOW, this approach would not be practical
within the context of a JSP, right?

> Then if an exception occurs I just dump the previous contents of the
string,
> change it to the error display and write it to the output.

Of course you could also forward to an errors page on the occurrence of an
exception since there has been no committed response at that point.

> Whether this will work for you depends on exactly what you're doing,
> and how large your responses are.

Since responses are just HTML, I would not expect them to be very big.
Someone made mention of the fact that the default buffer size was 8k.  I'm
really surprised that I exceeded that with my test.

Thanks for the input.

       ... doug

Reply via email to