<% response.setContentType("application/xml; charset=UTF-8"); String strResponse = (String)request.getAttribute("ImsResponse"); out.print(strResponse); out.flush(); // Flush the content to client.
What I observed is servlet is sending the response to the client only after completing the database call bd.logStatistics().
For some reason flush() is not working. This is happening if the client is Java http client or Microsoft ASP/COM client. It works fine if the client is a browser. Is this the expected behavior? or Is it a bug in IBM servlet engine?
This problem is occurring in WSAD and shared WAS servers. Is there any way to make the servlet send the response to the Java http or MS COM client before completing the database call? Your help is greatly appreciated.
Note: For a reason the method call order is in that way in doPost(). Program has to work calling both methods one AFTER another. [ September 27, 2005: Message edited by: Nagesh Rachakonda ]
Joined: Dec 04, 2003
Would you please take a minute in helping me out?
Appreciate your time.
subject: PrintWriter flush() problem - flushing the output to the client