今天在使用maven整合ssm框架展示页面遇到的org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: [org.apache.taglibs.standard.tlv.JstlCoreTLV]的问题:
下面是我的代码:
`<%@ page language=“java” contentType=“text/html; charset=UTF-8”
pageEncoding=“UTF-8”%>
<%@taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c”%>
编号 | 名称 | 作者 | 价格 |
${book.bid } | ${book.bname } | ${book.author } | ${book.price } |
运行后页面出现:
我的原因是jstl的jar包添加错误了,应该在pom.xml中添加jstl-impl的依赖:
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
</dependency>