wood burning stoves 2.0*
The moose likes JSP and the fly likes JSTL: Attribute value does not accept any expressions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL: Attribute value does not accept any expressions" Watch "JSTL: Attribute value does not accept any expressions" New topic
Author

JSTL: Attribute value does not accept any expressions

Madhu Kaparapu
Ranch Hand

Joined: Jul 04, 2005
Posts: 35
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.....


Regards,
Madhu Kaparapu.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60781
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL: Attribute value does not accept any expressions
 
Similar Threads
Problem with jstl
Assistance needed - JSTL
JSTL installation
getting variable value
New to JSP