Model View Controller (MVC) is a widely used web development pattern. MVC pattern defines three interconnected components: model, view, and controller.
The controller controls the flow of the application. In JEE applications, a controller is usually implemented as a servlet. A controller servlet intercepts requests and then maps each request to an appropriate handler resource. In this section, we will build a classic MVC front controller servlet to redirect requests to views.