Neal Kaiser wrote:
>
> I have a bean, which can RequestDispatcher.forward() to an ErrorHandler.jsp
> file. Since this is a bean, even though I put a return statement after the
> forward(), the control will still go back to the servlet/jsp file (it just
> exits from the bean method, not the service() method)...
>
> Anyway, I was thinking. In my ErrorHandler.jsp file, is it possible to throw
> an exception that will abort the return back to the calling servlet/jsp??
Custom tags in JSP 1.1 will let you deal with this in a better way.
A tag handler can return a code telling the JSP container to not
process the rest of the page (actually, generate a return after the tag
handler call).
In JSP 1.0, you have to deal with this using scriptlets, e.g.:
<jsp:useBean id="x" ... />
<%
x.doSomethingThatMayForward();
if (x.isForwarded) {
return;
}
%>
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html