| Java FAQ | ||
| JSP FAQ | ||
| Servlet FAQ | ||
XyzWs Servlet FAQ:
Does the RequestDispatcher.forward/include method return?
Printer-friendly version |
Mail this to a friend
|
Advertisement
|
Does the RequestDispatcher.forward/include method return?
Actually the
The control (flow of program)is indeed returned to the line after this line once it completes.
The body of the code after the The control is absolutely returned. However, there are some restrictions on what you can do afterwards -- in particular, you can no longer write to the response (it is assumed that the forwarded-to servlet took care of that already), so the only prudent thing to do is "return". |