Spring Boot解决jsp中jstl标签无法使用问题

  • 需求:在测试Spring MVC的时候使用到了JSP,这个时候报错如下:
    在这里插入图片描述
  • 解决方法:
    加入以下依赖:
        <!--JSP依赖-->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--JSTL标签依赖-->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
                <!--Web开发包,将载入Spring MVC所需要的包,且内嵌tomcat-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
  • 效果:
    在这里插入图片描述
发布了180 篇原创文章 · 获赞 114 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_43404791/article/details/105587934
今日推荐