Spring Boot JSP not found -
in spring boot app switched thymeleaf jsp , working on local computer, when upload heroku server get
there unexpected error (type=not found, status=404). /web-inf/jsp/home.jsp
its jar packaged, mean if working locally not on heroku server?
try adding pom.xml
:
<dependency> <groupid>org.springframework.boot</groupid> <artifactid>spring-boot-starter-tomcat</artifactid> </dependency> <dependency> <groupid>org.apache.tomcat.embed</groupid> <artifactid>tomcat-embed-jasper</artifactid> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> </dependency>
and adding application.properties
:
spring.mvc.view.prefix=/web-inf/jsp/ spring.mvc.view.suffix=.jsp
and moving jsps src/main/webapp/web-inf/jsp
.
Comments
Post a Comment