Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL: Attribute value does not accept any expressions

 
Madhu Kaparapu
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to JSTL i want to do a sample program in jstl but i am getting the following error Iam using tomcat5.x

org.apache.jasper.JasperException: /testjstl.jsp(9,6) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
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)

I have place all the necessary tlds,jar in correct place.

Example:- testjstl.jsp

<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<html>
<head>
<title>Count to 10 Example (using JSTL)</title>
</head>
<body>
<c:forEach var="i" begin="1" end="10" step="1">
<c ut value="${i}" />
<br />
</c:forEach>
</body>
</html>

----------------------- web.xml --------
...
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tlds/c.tld</taglib-location>
</taglib>
</jsp-config>
....

I have place the c.tld at WEB-INF/tlds/c.tld And
jar file at WEB-INF/lib/standard.jar
WEB-INF/lin/jstl.jar

After compiling i am getting the error as
"According to TLD or attribute directive in tag file, attribute value does not accept any expressions"

give the possible solution please.....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are using the wrong version of the JSTL. Tomcat 5 is a JSP 2.0 container which requires JSTL 1.1. The URI you are using is a JSTL 1.0 URI.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic