Why does Spring boot not support jsp while it can render the page if we add proper jar reference

后端 未结 3 730
醉话见心
醉话见心 2020-12-10 09:59

It is written everywhere that Spring boot does not support jsp view. In its official document there are three reasons

  • With Jetty and Tomcat, i
3条回答
  •  误落风尘
    2020-12-10 10:16

    If you choose to use JSP. As it turns out, Java servlet containers—including embedded Tomcat and Jetty containers—usually look for JSPs somewhere under /WEB-INF. But if you’re building your application as an executable JAR file, there’s no way to satisfy that requirement. Therefore, JSP is only an option if you’re building your application as a WAR file and deploying it in a traditional servlet container. If you’re building an executable JAR file, you must choose Thymeleaf, FreeMarker, or one of the other options

提交回复
热议问题