This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have an query that if i clicked on stop just after a while i clikced on submit button which os going to call servlet and processing some database query. same if I clicked on back button or forward button.
In the little server I wrote the error is not detected until all the heavy server processing is done and I start to write the response. Is that true in serious servers as well or have they found a way to kill whatever task the server is running for the user? Hitting refresh a few times while a long-running query is executing can cause a lot of these errors in a hurry!
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
It's interesting question. I believe servlet should continue sending something to a browser when processing a request and as only IO error happens, it should stop processing and roll back any changes. The trick is that no actual IO exception rosen, so you have to call checkError() to figure out that a browser stopped accepting your stream. I doubt that majority of servlet developers use this technology. Of course it isn't relevant how big and complex servlet container used.