Spring MVC can be used for creating web applications. It provides an easy framework to map incoming web requests to a handler class (Controller) and create dynamic HTML output. It is an implementation of the MVC pattern. The Controller and Models are created as POJOs, and Views can be created using JSP, JSTL, XSLT, and even JSF. However, in this chapter, we will focus on creating Views using JSP and JSTL.
You can find the Spring web documentation at https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html.
A web request is handled by four layers in Spring MVC:
- Front controller: This is a Spring servlet configured in web.xml. Based on the request URL pattern, it passes requests to the Controller.
- Controller: These are POJOs annotated with @Controller. For each Controller that you write, you need to specify a URL pattern that...