This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes According to TLD or attribute directive in tag file, attribute value does not accept any expressions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "According to TLD or attribute directive in tag file, attribute value does not accept any expressions" Watch "According to TLD or attribute directive in tag file, attribute value does not accept any expressions" New topic
Author

According to TLD or attribute directive in tag file, attribute value does not accept any expressions

surjeet yadav
Greenhorn

Joined: Nov 08, 2010
Posts: 2
<%@ 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">
<cut value="${i}"/>

<br />
</c:forEach>
</body>
</html>





hi friends i get the eror that "According to TLD or attribute directive in tag file, attribute value does not accept any expressions" when i write this simple program in netbeans ide 6.5rc2. i have added library jstl1.1 still i get eror.
please give me a solution.
thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60815
    
  65

Your URI is incorrect. It should be: http://java.sun.com/jsp/jstl/core


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 35
<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<head>
<title>User Info Entry Form </title>
</head>
<body>
<form action="input_jstl.jsp" method="post">
<table>
<tr>
<td> Name: </td>
<td><input type="text" name="username"> </td>
</tr>
<tr>
<td> Birth Date: </td>
<td><input type="text" name="birthdate"></td>
<td> (use format yyyy-mm-dd) </td>
</tr>
<tr>
<td>Email Address: </td>
<td><input type="text" name="email"></td>
<td> (use format name@company.com) </td>
</tr>
<tr>
<td> Gender: </td>
<td><input type="radio" name="gender" value="m" checked>Male<br>
<input type="radio" name="gender" value="f">female </td>
</tr>
<tr>
<td>Favorite Foods: </td>
<td><input type="checkbox" name="food" value="pi">Pizza <br>
<input type="checkbox" name="food" value="pa">Pasta <br>
<input type="checkbox" name="food" value="ch">Chinese<br>
</td>
</tr>
<tr>
<td colspan=2><input type="submit" value="Submit"></td>
</tr>
</table>
</form>

<br><br><h3> You have entered the following data: </h3> <br><br>
Name: <c:out value="${param.username}" /><br>
Birth Date: <c:out value="${param.birthdate}" /><br>
Email Address: <c:out value="${param.email}" /><br>
Gender: <c:out value="${param.gender}" /> <br>
Favorite Food: <c:forEach items="${paramValues.food}" var="current">
<c:out value="${current}" />  
</c:forEach>
</body>
</html>

Still getting the same error.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60815
    
  65

Where? Which line? Please TellTheDetails.
Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 35
/input_jstl.jsp (line: 42, column: 12) According to TLD or attribute directive in tag file, attribute value does not accept any expressions

Line 42 is
Name: <c:out value="${param.username}" /><br>
Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 35
I changed filename to Test.jsp and now it is working properly
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60815
    
  65

That's.... odd. What you name your JSP has no bearing on the tag library.
Tripti Ag
Ranch Hand

Joined: Jul 03, 2009
Posts: 35
I know, that's why I posted it too. Earlier filename was input_jstl.jsp. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: According to TLD or attribute directive in tag file, attribute value does not accept any expressions
 
Similar Threads
Problem with jstl
JasperException with JSTL
JSP expression language error
According to TLD or attribute directive in tag file, attribute value does not accept any expressions
JSTL: Attribute value does not accept any expressions