liveBook · Manning

Chapter 8: Implementing web apps with Spring Boot and Spring MVC

What you will learn in chapter 8 of Spring Start Here, Second Edition

Introduces dynamic web views and explains that a template engine displays variable data sent by a controller.

After this chapter you will be able to

What it builds on

Section by section

Introduction

Introduces dynamic web views and explains that a template engine displays variable data sent by a controller.

Key terms: dynamic views, template engine, controller, variable data

8.1 Implementing web apps with a dynamic view

This section shows how a Spring MVC controller sends data to a Thymeleaf view so the same page can display different content.

Key terms: dynamic view, dispatcher servlet, handler mapping, controller, view name, Model, addAttribute(), key, value, @RequestMapping

8.1.1 Getting data from the HTTP request

This section explains why web apps receive client data and compares four ways to send it in an HTTP request.

Key terms: client, server, HTTP request parameter, query parameter, query expression, path variable, HTTP request header, HTTP request body

8.1.2 Using query string parameters to send data from client to server

This section explains when query string parameters are useful, how a client sends them, and how a Spring MVC controller receives them.

Key terms: request parameters, query string parameters, search and filtering criteria, query string, key=value, request parameter, @RequestParam, controller’s action method, HTTP request parameter, @RequestParam(required=false)

8.1.3 Using path variables to send data from client to server

This section explains how path variables carry client-supplied values in a URL and when to use them instead of request parameters.

Key terms: path variable, @PathVariable, controller’s action, path variables, request parameters, mandatory parameters, optional values

8.2 Using the GET and POST HTTP methods

The section uses a product-list web app to show how HTTP methods distinguish viewing data from adding it, how Spring MVC maps those requests, and how request data reaches a controller.

Key terms: path, HTTP method, HTTP GET, /products, ProductService, Model, dispatcher servlet, view, HTTP POST, HTML form

8.3 Questions

This section provides questions for reviewing chapter concepts, with answers in Appendix A.

8.4 Summary

This summary connects dynamic views, client-supplied request data, and HTTP methods in Spring web apps.

Where this is used later

Concepts explained in this chapter

← Chapter 7: Understanding Spring Boot and Spring Chapter 9: Using the Spring web scopes →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.