What is the role of the controller in MVC architecture?

Lasse Koskela

The role of controller is to dictate what to do behind the scenes and what to display in the view next.

1. Controller receives a request
2. Controller decides the requested activities based on request parameters
3. Controller delegates tasks to be performed based on the request parameters
4. Controller delegates the next view to be shown

There must be a lot better explanations for the controller's responsibilities, but at least I tried...

As it comes to choosing between a JSP and a servlet for the controller implementation, servlet is the obvious choice as JSPs are designed for simplifying generating dynamic responses primarily (mixing HTML and logic).

[See also: What is the best way of implementing a web application that uses JSP, servlet and EJB technologies all together following a Model View Controller (MVC) architecture?
what is the role of controller in MVC architecture