What is RequestProcessor and RequestDispatcher?
The controller is responsible for intercepting and translating user input into actions to be performed by the model. The controller is responsible for selecting the next view based on user input and the outcome of model operations. The Controller receives the request from the browser, invoke a business operation and coordinating the view to return to the client. The controller is implemented by a java servlet, this servlet is centralized point of control for the web application. In struts framework the controller responsibilities are implemented by several different components like The ActionServlet Class The RequestProcessor Class The Action Class The ActionServlet extends the javax.servlet.http.httpServlet class. The ActionServlet class is not abstract and therefore can be used as a concrete controller by your application. The controller is implemented by the ActionServlet class. All incoming requests are mapped to the central controller in the deployment descriptor as follows.
Related Questions
- What is the difference between RequestDispatchers forward(ServletRequest request, ServletResponse response) method and HttpServletResponses sendRedirect(String location) method?
- Why do I get the error "IllegalStateException" when using the RequestDispatcher?
- What is the Advantage of using sendRedirect than RequestDispatcher ?