Hello,
I am not able to get JSTL core tags to work for me.I checked my web.xml and I think JSTL is enabled.I tried using scriplets
and it works fine.Rows are not being displayed though when I use the core:forEach tag.
Following is the code in my
JSP:
<[
<%@ 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">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>
test</title>
</head>
<body>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.domainmodel.*;" %>
<%
ArrayList arrays = (ArrayList)request.getAttribute("array");
out.println(arrays.size());
Entity en = (Entity)arrays.get(0);
out.println(en.getEntityID());
%>
<core:forEach items="${array}" var="entity">
<h3>${entity.entityID}</h3>
${entity.bid}
</core:forEach>
]>
Please advise.
Thanks
Richard