I am attempting to create a
Servlet controller that accepts all requests for a web app and forwards to an appropriate
JSP.
I basically have a set of if statements that
test certain request parameters, and within each if construct, I have a getServletContext().getRequestDispatcher(...).forward(...) statement.
I have been debugging my application, and it seems that the if statement will sometimes evaluate as true, the forward statement will execute, and still the debugger will continue to execute the statements after the forward.
I was under the impression that the execution would not "return" from a forward. (just because that seems convenient)
1) Was I mistaken?
2) If so, what is the appropriate way to handle this?
3) Is there ever a reason to forward to a page and then purposefully resume execution afterwards?
(If this post seems like it rambles, I apologize... I've been coding for 15 hours straight on two sandwiches and no breaks... )