By default Spring Boot did not come with JSP support. Here’s how to set your app to use JSP:
- Set the project to use tomcat7-maven-plugin rather than spring-boot-maven-plugin
- Add / ensure following Maven dependencies are setup
org.springframework.boot spring-boot-starter-tomcat provided org.apache.tomcat tomcat-jsp-api provided javax.servlet jstl - The Web MVC auto configuration feature of Spring Boot sets you up with a ViewResolver with blank suffix and prefix, hence you can place jsp in src/main/webapp/WEB-INF/test.jsp and have your controller return path to it
("/test") public class TestController { (method = GET) public String test() { return "/WEB-INF/test.jsp"; } }
Hope this helps!