Show TOC Start of Content Area

Background documentation IOException in Cases When Client Closes Connection  Locate the document in its SAP Library structure

The AS Java’s Web Container provides the runtime IOException to determine the behavior of the servlet’s output and input streams when the client connection has been lost. The purpose of the exception is to notify servlets that the client connection has been closed so they can stop reading from the input stream, or writing content to the output stream.

When the physical connection to the client is lost for some reason, the event is known only to the Internet Communication Manager (ICM) that handles client connections. To inform the server processes where servlets or JSP pages are running about the client connection loss, the ICM sends an event to them. The SAP’s implementation of the ServletOutputStream checks in its flush() method whether such an event has been received. In cases when the client connection has been closed, the IOException is thrown with the error message The connection is closed. This interrupts the flushing of the content of the output stream.

The same exception is thrown if the client connection has been closed when the read() method of the ServletInputStream is called.

 

End of Content Area