J
Jim Bancroft
Hi everyone,
We're trying to use MVC in our J2EE application. We have a servlet that
acts as the controller. All our pages post to this servlet, which is
supposed to read one of the input values and forward to the appropriate
page. My question: is it possible for the servlet to "forward" all of the
form inputs to the page too?
Our code looks something like this:
String action = request.getParameter("action");
String aURL = locateTheAppropriateURL(action);
RequestDispatcher requestDispatcher =
request.getRequestDispatcher(aURL);
requestDispatcher.forward(request, response);
I don't see any mechanism for automatically passing along any other
form/request variables to the new page. Is there a good way of doing this?
Thanks!
We're trying to use MVC in our J2EE application. We have a servlet that
acts as the controller. All our pages post to this servlet, which is
supposed to read one of the input values and forward to the appropriate
page. My question: is it possible for the servlet to "forward" all of the
form inputs to the page too?
Our code looks something like this:
String action = request.getParameter("action");
String aURL = locateTheAppropriateURL(action);
RequestDispatcher requestDispatcher =
request.getRequestDispatcher(aURL);
requestDispatcher.forward(request, response);
I don't see any mechanism for automatically passing along any other
form/request variables to the new page. Is there a good way of doing this?
Thanks!