tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash Arora <aroraavin...@gmail.com>
Subject <c:forEach> tag not working
Date Wed, 08 Jun 2005 22:49:06 GMT
Hi,
I am trying to iterate across the LinkedList using <c:forEach > of core tags 
of JSTL 2.0 on the Tomcat5.0.28. When I try to iterate using the following 
tag--
 <c:forEach var="element" items="${llCr}">
//some code
</c:forEach>
 I get the following error on JSP page----

*org.apache.jasper.JasperException: /viewAllCR.jsp(50,0) According to TLD or 
attribute directive in tag file, attribute items does not accept any 
expressions
*org.apache.jasper.compiler.DefaultErrorHandler.jspError(
DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java
:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java
:150)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(
Validator.java:941)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java
:696)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Validator.validate(Validator.java:1475)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:214)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java
:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java
:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 But if I remove the tag and use a while loop in the scriplet, it works 
fine. What is the reason behind it? Any suggestions.
 Thanks,

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