This tutorial walks you through the steps of creating a Hello World web app example with Spring Boot and JSP.

Spring Boot View Templates Hello World Tutorial and Example Series:
- Spring Boot Hello World Tutorial and Example with FreeMarker
- Spring Boot Hello World Tutorial and Example with Thymeleaf
- Spring Boot Hello World Tutorial and Example with JSP

What you'll build

What you'll need

  • JDK 8+ or OpenJDK 8+
  • Maven 3+

Project structure

Project dependencies


Hello Controller

Controller maps HTTP Requests with View.


@RequestMapping maps /hello request to hello() method.

name is a query string parameter of /hello request.

Model object passes value to hello view (hello.jsp).

View Template


Static files



Application Configuration



Run with Maven

Type this bash command at the example root directory and visit to localhost:8080

mvn clean spring-boot:run

Source code

https://github.com/hellokoding/hellokoding-series/tree/master/springboot-examples/view-templates/jsp-helloworld

Spring Boot View Templates Hello World Tutorial and Example Series:
- Spring Boot Hello World Tutorial and Example with FreeMarker
- Spring Boot Hello World Tutorial and Example with Thymeleaf
- Spring Boot Hello World Tutorial and Example with JSP