MVC in the Servlet & JSP world

VIEW
Responsible for the presentation. It gets the JSP state of the model from the Controller (although not
directly; the Controller puts the model data in a place where the View can find it). It’s also
the part that gets the user input that goes back to the Controller.

CONTROLLER
Takes user input from the request and figures out what it means to the model. Servlet Tells the model to update itself, and makes the new model state available for the view (the JSP).

MODEL
Holds the real business logic and the state. In other words, it knows the rules for getting and updating the state. A Shopping Cart’s contents (and the rules for what to do with it) would be part of the Model in MVC. It’s the only part of the system that talks to the database (although it probably uses another object for the actual DB communication, but we’ll save that pattern for later...)