I\'m trying to add a jsp page in my Spring Boot service. My problem is that every time I try to go to that page I have this:
Whitelabel Error Page
This is working solution for me about White label error page : Cannot find view page(jsp)
At POM.xml, Make sure packaging is "war" and add tomcat/jasper dependencies
war
org.springframework.boot
spring-boot-starter-tomcat
provided
org.apache.tomcat.embed
tomcat-embed-jasper
provided
Add prefix/suffix at application.properties
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
** If you use Intellij, you must set Web Resource directories. At Project Structure (ctrl+alt+shift+ S) > Facets > Select Web(your application) > Add(+) Web Resource Directories ( mine is ......\src\main\webapp)
** If you have multiple modules(At intellij), Run> Edit configuration> Select springboot your application > Configuration tab> Working directory as $MODULE_WORKING_DIR$