This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
I believe that what is happening is that the RequestStatement thread is not finishing by the time the HTTP thread, which the servlet code is running on is finishing and closing the connection.
In this case I don't see a reason to start the second thread because you would have to synchronize and wait for it to complete before returning from the servlets doXXX method anyway. It will also complicate error handling, redirection and including content should that ever become necessary.
Joined: Mar 21, 2011
Thanks Chris of your answer. You're right, i just put a join() on my thread and it works