1.启动项继承   SpringBootServletInitializer


springboot web项目在本机可以访问jsp 在tomcat下不能访问jsp 解决办法



2.

<!--配置jsp jstl的支持-->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
</dependency>

<!--添加对tomcat的支持-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

<!--对jsp的支持-->
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-jasper</artifactId>
</dependency>

相关文章:

  • 2021-11-03
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2021-07-01
  • 2021-08-02
猜你喜欢
  • 2022-12-23
  • 2021-09-26
  • 2021-12-20
  • 2021-11-08
  • 2022-03-01
  • 2021-07-31
  • 2021-04-08
相关资源
相似解决方案