What is ActionServlet?

ActionServlet class act as the “controller” component in the Model-View-Controller (MVC) design pattern for an applications which is commonly called as “Model 2” architecture.

Application may have one instance of this servlet class which is used to receive and processes all requests that change the state of a client’s interaction with the application. The servlet delegates the handling of a request to a RequestProcessor class object. The RequestProcessor is used to process request and it selects and invokes an Action class to perform the requested business logic.

Action classes can change the state of the application’s interaction with the client by updating or creating JavaBeans that are stored as request or session attributes which is used to interact with client and model and these JavaBeans are also be called as “model” component of an MVC architecture.

Action classes generally return an ActionForward to indicate which next resource will handle the response. If the Action does not return null, the RequestProcessor forwards or redirects it to the specified resource by utilizing RequestDispatcher.forward or Response.sendRedirect so as to produce the next page of the user interface.

Hope you like it, Please comment so as to improve it.