I have a problem that I was hoping writing a custom tag would solve...

I have a jsp page, which uses a bean. This bean can catch an exception, and
use a RequestDispatcher.forward()
to an ErrorHandler JSP.  Even though I have a return statement after the
forward() in the bean, it returns control
back to the original JSP (unlike a return statement in a JSP which returns
from the service method). This follows the spec...but it also breaks my
application. The ErrorHandler page is shown, but control continues back to
the original JSP.

Anyways, rather then setting attributes and checking for attributes (to
detect if there was a forward to ErrorHandler) I thought I could write a
custom <abort> tag which would stop the control by returning SKIP_PAGE from
the doEndTag() method....

This does stop any content after the <abort> tag on the ErrorHandler.jsp
page, however, just like the bean, it returns control back to the first JSP
that was called. Is this per spec?  Am I out of luck with a clean solution
to this?

Thanks,
Neal

Reply via email to