Implementing controllers

As we have seen in the MVC pattern, controllers are also one of the crucial components of the MVC pattern. They are responsible for executing the actual request, preparing the model, and sending this model along with logical view name to the front controller. In a web application, the controllers work between the web layer and the core application layer. In the Spring MVC framework, controllers are also more like POJO classes with methods; these methods are known as handlers, because these are annotated with the @RequestMapping annotation. Let's see how to define controller classes in a Spring web application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset