Re: c:forEach problem
Ashmeet <[email protected]> Tue, 25 Sep 2007 21:44:10 -0700 (PDT)
| Newsgroups | gmane.comp.jakarta.taglibs.user |
|---|---|
| Message-ID | <[email protected]> |
Hi,
try using this ...<%@taglib prefix = "c" uri =
"http://java.sun.com/jsp/jstl/core" %>
I also had same problem which was solved by using above directive.
regards,
Ashmeet
Andre Prasetya-2 wrote:
>
> Hi
>
> i m new to jsp and jstl. i m using tomcat 5.5, and standard.jar
>
> my taglib declaration is
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
>
> the code that is in problem is
> <c:forEach var="prod" items="${model.products}">
> ${prod.products} ${prod.price}<br/><br/>
> </c:forEach>
>
> 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
> expressions
>
> where have i gone wrong ?
>
> --
> -Andre-
>
> People see things the way they are and say "why ?" I see things that never
> were and say "Why not ?"
>
>
--
View this message in context: http://www.nabble.com/c%3AforEach-problem-tf3604887.html#a12893918
Sent from the Taglibs - User mailing list archive at Nabble.com.