hi when the servlet is executing half the way through, if am clicking the stop button in the browser what will happen inside the servlet and in the server. Which will handle this scenario a servlet or a server. if i want to handle in my servlet, what should i do then? regards sri
The sequence of action is: 1. User (browser) sends a URI request to the server. Browser waits for results. The STOP button is enabled. 2. Server decodes URI and determines the action to take. For an HTML page, this is just a matter of locating the file that corresponds to that URL and copying its contents back to the client. For servlets, the servlet dispatcher locates the appropriate servlet and passes the request to that servlet. 3. Servlet executes. Output is placed on the return output stream and transmitted back to the client. 4. When all data has been received, the client displays it (often this is done on-the-fly) and the browser unlocks for another request (the STOP button is disabled). If you click the STOP button, it unlocks the browser and causes the returning data from the servlet to be discarded. However, if you look at the servlet API, you'll notice that there's no such thing as an HTTP STOP request handler. It is a totally non-interactive process. Once the servlet starts, it's going to run to completion.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
a bit of art, as a gift, the permaculture playing cards