tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andre Prasetya" <>
Subject c:forEach problem
Date Thu, 19 Apr 2007 04:38:05 GMT

i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar

my taglib declaration is
<%@ taglib prefix="c" uri="" %>

the code that is in problem is
<c:forEach var="prod" items="${model.products}">
    ${prod.products} <i>${prod.price}</i><br/><br/>

the model declaration is as follows
        String now = new Date().toString();
        Map myModel = new HashMap();
        myModel.put("now", now);
        myModel.put("products", productManager.getProducts());

productManager.getProducts() will return a List

i get exception
org.apache.jasper.JasperException: /WEB-INF/jsp/hello.jsp(12,0) According to
TLD or attribute directive in tag file, attribute items does not accept any

where have i gone wrong ?


People see things the way they are and say "why ?" I see things that never
were and say "Why not ?"

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message