> Goodness! Don't try this at home, kiddies! Just put a return statement after
> your call to forward() and save yourself a lot of trouble.
Note, I wasn't advocating this. I was saying that the semantics of GOTO are
not available in Java with respect to methods which always return. Theoretically,
one could use exceptions to prevent return of control, of course, it's a dumb
idea.
Perhaps if service() and forward() returned a value, people would write
code like
return forward(...);
Which would prevent the usual mistakes I see JSP users making.
-Ray
> >
> > About the only trick I can think of to avoid returning control is to throw
> > a RuntimeException and hope that the servlet/JSP doesn't handle it.
> >
> > -Ray
>
> ===========================================================================
> 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
>
===========================================================================
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