Spring MVC

This tutorial will teach you how to retrieve URI path variables in your Spring MVC web application. Define Path Variable To define a path variable in the URI path, we use curly brackets. For example, the @GetMapping annotation below specifies one path variable called userId, which is surrounded by curly brackets. @GetMapping(path=”/users/{userId}”) @PathVariable Annotation To…

Read More Spring MVC: Reading URI Path Variables

In this lesson, you will learn how to read URL query string parameters in your Spring MVC web application.   @RequestParam annotation Let’s assume that we need to create a method that needs to return a list but is limited to a certain number. To make our method read URL Query String Parameters, we will…

Read More Spring Web MVC – Reading URL Query String Parameters

In this tutorial, you will learn how to pass information from your Controller class to the View using the Spring MVC ModelAndView object. In previous lessons, we discussed how to use Model and ModelMap for the same purpose – to pass properties from Controller to the View.  The ModelAndView class, you will also use to pass…

Read More Spring Web MVC – The ModelAndView Object

In this tutorial, you will learn how to configure the Spring Boot Web MVC application to support JSP(Java Server pages) and JSTL(JSP Standard Tag Library). Video Tutorial Maven Dependencies To configure your Spring Boot application to support Spring MVC, JSP and JSTL add the following maven dependencies to the pom.xml file. Spring Web The following…

Read More Spring Web MVC – Configure JSP Support

This tutorial is a high-level overview of the Spring Web MVC framework. Below is a high-level diagram of how things work in a Spring MVC Web application built with Spring Boot.    Most online tutorials or books will show you a similar diagram that is designed around the Dispatcher Servlet. Because this Dispatcher servlet is…

Read More Spring Web MVC – Overview for Beginners

Internationalization (i18n) is the process of making your application and services capable of delivering in different languages. This tutorial will show how the Spring Boot framework manages internationalization. Overview The internet has become global, implying that any application or website can target millions of users worldwide. Although half of the world’s population may have access…

Read More Spring MVC Internationalization Tutorial

In this Spring Boot tutorial, you will learn how to implement User Authentication(User Login) functionality for your RESTful Web Service application. There is also a step-by-step video demonstration on how to do User Authentication available here. The user authentication functionality we are going to implement in this tutorial will work the following way: A user…

Read More User Authentication – Spring Boot, Spring Security, JWT

In this tutorial, you will learn how to read HTTP Request Header in the Rest Controller class of your Spring Boot application. To read HTTP Request Header in Spring Boot REST application, we use @RequestHeader annotation. @RequestHeader(value=”Accept”) String acceptHeader To learn how to test if HTTP Header is received, read the tutorial about Testing HTTP Header…

Read More Read HTTP Request Header in Spring Boot REST