So I have a simple JSP page to display some information like this:
<%@ page import="db.DataManager"%>
<%@ page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!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>
<%
DataManager dm = (DataManager) application.getAttribute("datamanager");
ArrayList<DataManager.Author> authors = dm.getAuthors();
%>
<body>
<table>
<tr>
<th></th>
<th>Name</th>
<th>Born</th>
<th>Died</th>
</tr>
<c:forEach var="author" items="${authors}">
<p>hello</p>/* not showing */
<tr>
<td>${authors.id}</td>
<td><a href="author.jsp">${author.name}</a></td>
<td>${author.born}</td>
<td>${author.died}</td>
</tr>
</c:forEach>
</table>
</body>
</html>
But somehow whatever I put inside the <c:forEach>
tag, it doesn't show up on the actual page (including the testing
tag). I have the jar file of jstl 1.2 in WEB-INF/lib directory, so I don't know what is going on.