In chapter 7, we made progress in understanding how to use Spring to write web apps. We’ve discussed a web app’s components, the dependencies a web app needs, and the Spring MVC architecture. We even wrote a first web app to prove all these components work together.
In this chapter, we’ll take a step further and implement some capabilities you’ll find in any modern web app. We start with implementing pages whose content changes according to how your app processes the data for specific requests. Today we rarely see static pages on websites. You probably think, “There has to be a way to decide what content to add on the pages before delivering the HTTP response back to the browser.” There are ways you can do this!
In section 8.1, we’ll implement dynamic views using template engines. A template engine is a dependency that allows you to easily get and display variable data the controller sends. We’ll demonstrate how the template engine works in an example after reviewing the Spring MVC flow.