You are right. Control does return to the calling servlet. It just couldn't
write to the response. It would be nice if an exception was thrown.
After control returns to the calling servlet, I try forwarding to a second
servlet and that doesn't seem to work. The first servlet that was forwarded
to did not change the response.
Is multiple forward within a servlet not supported/allowed?
Bill
"Craig R. McClanahan" wrote:
> William Au wrote:
>
> > Is there any way in Tomcat 3.2.1 for the control to return to a servlet
> > after its
> > call to RequestDispatcher.forward() is completed?
>
> Control *does* return -- RequestDispatcher.forward() is a normal Java
> method call.
>
> However, the servlet spec prohibits you from modifying the response at this
> point. If Weblogic lets you do this (for instance, by allowing you to add
> additional text to the response created by the forwarded-to servlet), then
> it is not obeying the spec.
>
> > That is the behavior
> > of
> > WebLogic 5.1.0. I want my code to work on the same way running under
> > both. I am aware of the RequestDispatcher.include() method.
> >
> > Bill
> >
>
> Craig McClanahan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]