Wednesday, June 17, 2020

path with web-inf or meta-inf web-inf/jsp/index.jsp | Spring Boot JSP 404

Solution 1: Ensure that you have jasper and jstl in the list of dependencies:

    <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-jasper</artifactId>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
    </dependency>

Solution 2: Also! For others with similar problems when using Spring Boot 1.3.0 

You have likely missed that spring.view.prefix and spring.view.suffix properties have changed name to spring.mvc.view.prefix and spring.mvc.view.prefix respectively

Solution 3: Remove the provided scope from the tomcat-embed-jasper dependency before it worked!

No comments:

Post a Comment