<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%
String[] movies = {"Sholay", "Maine Pyar kiya", "Jai Santoshi Maa", "Kaho Na Pyaar Hai", "Krish", "Rang De Basanti"};
pageContext.setAttribute("movies", movies, pageContext.PAGE_SCOPE);
%>
<html>
<head>
<title>forEach and status</title>
</head>
<body>
The forEach has one scoped variable called 'count', it tells the
current position of the element within the collection. <br>
<c:forEach var="movieName" items="${pageScope.movies}" varStatus="status">
Movie Number : <c:out value="${status.count}" /> is
<c:out value="${movieName}" /> <br />
</c:forEach>
</body>
</html>
--
ఇట్లు మీ,
చంద్రశేఖర్.
<%
String[] movies = {"Sholay", "Maine Pyar kiya", "Jai Santoshi Maa", "Kaho Na Pyaar Hai", "Krish", "Rang De Basanti"};
pageContext.setAttribute("movies", movies, pageContext.PAGE_SCOPE);
%>
<html>
<head>
<title>forEach and status</title>
</head>
<body>
The forEach has one scoped variable called 'count', it tells the
current position of the element within the collection. <br>
<c:forEach var="movieName" items="${pageScope.movies}" varStatus="status">
Movie Number : <c:out value="${status.count}" /> is
<c:out value="${movieName}" /> <br />
</c:forEach>
</body>
</html>
--
ఇట్లు మీ,
చంద్రశేఖర్.
No comments:
Post a Comment