JSTL Problem

Hi I get an 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

the code in problem is

<c:forEach var="prod" items="${ model.products }">

${prod.products} <i>${prod.price}</i>

</c:forEach>

the declaration and content for model is

String now = new Date().toString();

Map myModel = new HashMap();

myModel.put("now", now);

myModel.put("products", productManager.getProducts());

productManager.getProducts() return a List

where is my mistake ? i m using standard.jar from jakarta-taglibs but i tried repacing it with the one from netbeans and still the same.

[790 byte] By [rafunkela] at [2007-11-27 1:34:21]
# 1

at the top of your web.xml file, do you find this:

<web-app version="2.4"

xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

?

I don't see anything wrong with your code, so it must be a library/config error somewhere. Try removing all jstl related jars (jstl.jar and standard.jar) and use the ones supplied by netbeans.

gimbal2a at 2007-7-12 0:41:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Sounds like you may be trying to use JSTL1.0 in a JSP2.0 container.Check out this thread (reply#6) for a detailed explanation http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
evnafetsa at 2007-7-12 0:41:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...