Stopping / Halting a JSP's execution ??
843836Jun 9 2004 — edited Feb 6 2007I am working on an application that uses privately developed security and we check for validation on every page of our system. We do this using a Tag defined in the system TLD file.
We are finding some relatively strange behavior. We notice that even though the first thing on the page is our security validation tag, the rest of the tags on the page are getting evaluated and throwing errors because of the dependency on the security aspects. Our system operates that if the security clauses are not satisified, the user is sent a redirect to a login page. At this point, the rest of the initial page is not necessary or required so we would like it to stop evaluating.
It does not affect our system negatively in a usability sense, it simply makes our logs go crazy because there are 'expected' errors thrown and we, being the tidy and neat developers that we are, hate having our logs filled with errors that should not be there. The only way it seems to stop the process IS to throw an exception. That seems to break the 'thread' so the process is stopped and no further errors are thrown. Will Thread.stop or Thread.interrupt handle it?
Is there a way to halt or stop the execution of a JSP at a point when the rest of the page should not be evaluated, either by user or system intervention?