【发布时间】:2011-05-25 04:17:05
【问题描述】:
我尝试了带有 jstl 的代码。例外是
org.apache.jasper.JasperException: 绝对 uri:http://java.sun.com/jsp/jstl/core 无法在 web.xml 或随此应用程序部署的 jar 文件中解析
我正在使用日食。我添加了jstl.jar 和standard.jar。我现在应该给web.xml 什么?我不知道该给<taglib> 什么。
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<c:forEach var = "userName" items = "${name}">
<tr>
<td>${userName}</td>
</tr>
</c:forEach>
</body>
</html>
【问题讨论】:
-
您使用的是哪个 servlet 容器?