> Kevin Jones wrote:
> > Wrong on both counts I'm afraid - the call can be forwarded to a resource,
> > whcih will typically be a servlet or a JSP, and the call will return to
> you.
> > You typically put a <code>return;</code> statement after the
> > RequestDispatcher call,


>     "Unlike the include() method, control will never return to the servlet
> that forwards the request. The forward() method passes all control to the
> delegate servlet which..."

These semantics are impossible to achieve in Java. A method in Java must
return. When you call forward(), at some point,  that function will
return to the calling frame.  Other languages, like some C compilers support
volatile functions, or the ability to specify that a method call should not
return. (equivalent to a branch/jmp in assembly code. Or, if you like
BASIC, it's GOTO vs GOSUB)


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

Reply via email to