SSM 提示 http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files dep

錯誤的jsp 頁面:

<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>賬戶的列表頁面</title>
</head>
<body>
	<table border="1" width="300px">
		<tr>
			<th>編號</th>
			<th>賬戶名稱</th>
			<th>賬戶金額</th>
		</tr>
		<c:forEach items="${accounts}" var="account">
			<tr>
				<td>${account.id}</td>
				<td>${account.name }</td>
				<td>${account.money }</td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>

提示錯誤信息:

http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application

大致意思是jstl 標籤在部署的應用容器中不能被解析

解決辦法:複製jstl.jar 拷貝至Tomcat的lib 文件夾中

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章