For servlets not implementing the SingleThreadModel interface, if the service method (or methods such as doGet or doPost which are dispatched to the service method of the HttpServlet abstract class) has been defined with the synchronized keyword, the servlet container cannot use the instance pool approach, but must serialize requests through it.
Thanks for pointing out . Calling close() will cause flush by default.
Campbell Ritchie wrote:It is unnecessary to call flush() in that code. I trust you know why?