Errors and committing responses in Tomcat

S

Sebastian Millies

I sometimes observe the following behavior: A JSP is rendered
partly in my browser, then a Java Exception occurs on the
server, but of course the error page cannot be forwarded to,
because the response has already been committed.

This is bad behavior - I want to see the error page, reagardless of
whether the Java Exception is raised early or late during JSP
processing.

The JSP renders a pretty big chunk of HTML. Now, I would like
to be able to tell ´Tomcat to always buffer the page until it has been
rendered completely, and only then commit and send the repsonse.
At the very least, I want to be able to increase the buffer size. Is that
possible? (Tomcat 4.1.30)

Thanks, Sebastian
 
S

Sudsy

Sebastian Millies wrote:
The JSP renders a pretty big chunk of HTML. Now, I would like
to be able to tell ´Tomcat to always buffer the page until it has been
rendered completely, and only then commit and send the repsonse.
At the very least, I want to be able to increase the buffer size. Is that
possible? (Tomcat 4.1.30)

You could manage a java.io.CharArrayWriter programmatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top