My understanding is -- if the "if" condition in doANother is satisfied, then the prm stop be stopped after the HttpResponse directs to "some URL", but the case is -- the page is directed to "some URL" but the "doThird" is still executed, which is not what I want. Is that supposed to be like that ? If yes, how can I let the pgm stop immediately ?
Well, that call would fail with a SecurityException -- any servlet container worth its salt will stop servlets from calling this method. The exception would propagate up, and you'd end up with a server error. The page would already be served, though, so I'm not sure if the client would see it or not.
Joined: Jun 06, 2002
Tomcat 4.1.24 happily executes a servlet that contains a System.exit(0); call. Which shuts down the whole server!
subject: why the prm continue executing after I put "response.sendRedirect()" ?