无法在web.xml或使用此应用程序部署的jar文件中解析绝对uri:[http://java.sun.com/core]

Maven项目,使用Spring+SpringMVC+Mybatis的项目,jstl的jar包成功导入,但是一直报无法解析uri的异常。网上的办法基本都尝试过,现在说明一下我的解决方法:

由于jstl-impl自带依赖的servlet-api版本过低,应该去除依赖,导入合适版本的servlet-api,我是发现到这一点才成功的。我前面也逐步导入了jstl-impl,standard,standard-impl的jar包,可能这也是成功的原因之一

这是我的pom.xml关于jstl的部分


<!-- Servlet Begin -->
<dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.web</groupId>
                <artifactId>jstl-impl</artifactId>
                <version>1.2</version>
      <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>jstl</artifactId>
                <version>1.2</version>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.taglibs</groupId>
                <artifactId>taglibs-standard-impl</artifactId>
                <version>1.2.5</version>
            </dependency>
            <dependency>
                <groupId>taglibs</groupId>
                <artifactId>standard</artifactId>
                <version>1.1.2</version>
            </dependency>
            <!-- Servlet End -->

 

posted @ 2021-05-30 10:41  辰南以北  阅读(1701)  评论(1编辑  收藏  举报