This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Actually the RequestDispatcher.forward and RequestDispatcher.include are just method calls to the other servlet.
Control is indeed returned to the line after this line once it completes. The body of the code after the forward will still be processed and any unhandled exceptions will be thrown to requesting servlet.
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". [ October 24, 2006: Message edited by: wise owen ]
No, String fwdPath = "/ServletB"; RequestDispatcher rd = request.getRequestDispatcher(fwdPath); works. There are 3 ways to get a RequestDispatcher. And by the way, i am not sure, but I think getNamedDispatcher is not at the exam. You should focus on the other 2 ways instead. Can someone confirm this ? [ October 24, 2006: Message edited by: Max Fernandes ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: RequestDispatcher : content in the forwarding page.