JSP in /WEB-INF returns “HTTP Status 404 The requested resource is not available”

前端 未结 3 854
無奈伤痛
無奈伤痛 2020-11-22 07:43

I created a JSP file.

sample.jsp

<%@ page pageEncoding="UTF-8"%>


  
    <         


        
3条回答
  •  粉色の甜心
    2020-11-22 08:15

    In my spring boot web application with JSP it didn't worked until I have added this dependency

        
            org.apache.tomcat.embed
            tomcat-embed-jasper
            provided
        
    

    even after configuring view resolver

    spring.mvc.view.prefix: /WEB-INF/views/ 
    spring.mvc.view.suffix: .jsp
    

    If you find why this worked please comment.

提交回复
热议问题