Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV_html

 

 

 

在网上找了很多的方法,都没用。

最后到tomcat目录下找到apache-tomcat-8.0.52\webapps\examples\WEB-INF\lib

Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV_java_02

 

把这两个jar包和jstl.jar加到依赖中就可以使用

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

 1 <tbody>
 2                                 <c:if test="${empty requestScope.pageInfo.list }">
 3                                     <td colspan="6" align="center">抱歉!没有查询到您要的数据!</td>
 4                                 </c:if>
 5                                 <c:if test="${!empty requestScope.pageInfo.list }">
 6                                     <c:forEach items="${requestScope.pageInfo.list }" var="admin" varStatus="myStatus">
 7                                         <tr>
 8                                             <td>${myStatus.count }</td>
 9                                             <td><input type="checkbox"></td>
10                                             <td>${admin.loginAcct }</td>
11                                             <td>${admin.userName }</td>
12                                             <td>${admin.email }</td>
13                                             <td>
14                                                 <a href="assign/to/assign/role/page.html?adminId=${admin.id }&pageNum=${requestScope.pageInfo.pageNum }&keyword=${param.keyword }" class="btn btn-success btn-xs"><i class="glyphicon glyphicon-check"></i></a>
15                                                 <a href="admin/to/edit/page.html?adminId=${admin.id }&pageNum=${requestScope.pageInfo.pageNum }&keyword=${param.keyword }" class="btn btn-primary btn-xs"><i class=" glyphicon glyphicon-pencil"></i></a>
16                                                 <a href="admin/remove/${admin.id }/${requestScope.pageInfo.pageNum}/${param.keyword }.html" class="btn btn-danger btn-xs"><i class=" glyphicon glyphicon-remove"></i></a>
17                                             </td>
18                                         </tr>
19                                     </c:forEach>
20                                 </c:if>
21                                 </tbody>

下面的时pom文件中的依赖:
 1 <dependency>
 2       <groupId>javax.servlet.jsp.jstl</groupId>
 3       <artifactId>jstl</artifactId>
 4       <version>${jstl.version}</version>
 5     </dependency>
 6     <!-- https://mvnrepository.com/artifact/org.apache.taglibs/taglibs-standard-impl -->
 7     <dependency>
 8       <groupId>org.apache.taglibs</groupId>
 9       <artifactId>taglibs-standard-impl</artifactId>
10       <version>1.2.5</version>
11       <scope>runtime</scope>
12     </dependency>
13     <dependency>
14       <groupId>org.apache.taglibs</groupId>
15       <artifactId>taglibs-standard-spec</artifactId>
16       <version>1.2.5</version>
17       <scope>runtime</scope>

 

 

 

 

后来发现加两个依赖即可

 1     <dependency>
 2       <groupId>javax.servlet.jsp.jstl</groupId>
 3       <artifactId>jstl</artifactId>
 4       <version>${jstl.version}</version>
 5     </dependency>
 6     <dependency>
 7       <groupId>org.glassfish.web</groupId>
 8       <artifactId>jstl-impl</artifactId>
 9       <version>1.2</version>
10     </dependency>