wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes JSTL pg 437 HFSJ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "JSTL pg 437 HFSJ" Watch "JSTL pg 437 HFSJ" New topic
Author

JSTL pg 437 HFSJ

Harish Yerneni
Ranch Hand

Joined: Sep 15, 2004
Posts: 94
I am using netbeans 5.0 IDE and trying to workout example on pg 437. Below is my code

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@page isELIgnored = "false"%>


<html>

<body>

<h1>Movie List</h1>
<%
String[] movieList = {"Amelie", "Return of the King", "Mean Girls"};
request.setAttribute("movielist", movieList);
%>
<table>

<c:forEach var="movie" items="${movielist}">
<tr>
<td>$(movie}</td>
</tr>
</c:forEach>

</table>
</body>
</html>

When I run this code, I am getting below output. Why is movie not being evaluated? any ideas?

Movie List
$(movie}
$(movie}
$(movie}

Thanks,

Harish


SCJP 1.4 | SCWCD 1.4 | SCJD (WIP)
Harish Yerneni
Ranch Hand

Joined: Sep 15, 2004
Posts: 94
I have added jstl.jar and standard.jar to /WEB-INF/lib.
Harish Yerneni
Ranch Hand

Joined: Sep 15, 2004
Posts: 94
Guys, I found my mistake. It was $(movie}. Wrong brace.

Thanks,

Harish
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL pg 437 HFSJ