// put your jsp file in /src/main/resources/META-INF/resources/WEB-INF/jsp/sayHello.jsp // sayHello.jsp, the JSP View file in directory /src/main/resources/META-INF/resources/WEB-INF/jsp/ <html> <head> <title> My first HTML Page - JSP</title> </head> <body> <h1>Heading 1</h1> <h2>Heading 2</h2> My first html page with body - JSP </body> </html> // pom.xml: set up dependency for jsp <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <scope>provided</scope> </dependency> // application.properties: set up view resolver that takes the jsp filename from controller and makes up the filepath of the view spring.mvc.view.prefix=[/src/main/resources/META-INF/resources]/WEB-INF/jsp/ spring.mvc.view.suffix=.jsp logging.level.org.springframework=info // Controlller @Controller public class SayHelloController { @RequestMapping("say-hello-jsp") public String sayHelloJsp() { return "sayHello"; // the jsp file name } }