Below is code stub which just makes a list on
JSP and prints each value using forEach tag.But here its not printing the value?Can you let me know the error?
--------------------------------------------------------------------------
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@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">
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Log-On</title>
</head>
<%!
List list = new ArrayList();
%>
<body>
<%
list.add("1"); list.add("2");
list.add("3"); list.add("4");
%>
<table>
<c:forEach var="value" items="${list}" varStatus="status">
<th>${value}</th>
</c:forEach>
</table>
</body>
</html>