You need to decide at the top of the page before anything is started to be printedwhether to redirect.
However, I believe that just like with tag classes , with JSP scriptlet or JSTL you can cancel page processing, then redirect, but that may be the same clause(meaning you could have processed a large portion of the page but not sent it).
Look through the <@page > directives for buffer , and i think one directive has an attribute output whether to be "verbose"(output as it occurs) also.
...did you have the fish?!............................ No.