Spring Boot - where to place the jsp files

前端 未结 8 2140
无人及你
无人及你 2020-12-20 15:55

I am trying to develop a new Spring boot application using MVC as a first step to move my existing Spring MVC application to Spring boot.

However, I am facing an is

8条回答
  •  醉梦人生
    2020-12-20 16:28

    There is a dependency to include as Spring boot doesn't know how to translate JSP to Servlet. So,

    1. Check the version of your tomcat-embed-core-.jar.

    2. Go to that corresponding version release on https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-jasper

    3. Copy the dependency, it will look like-

    
            org.apache.tomcat
            tomcat-jasper
            9.0.37 
     
    

    here version needs to be updated as per your tomcat-embed-core jar version

    1. Update Maven Project so that it can download the jar from repo.

    Now you are good to go with your project.

    thanKs.

提交回复
热议问题