|
@@ -1,3 +1,4 @@
|
|
|
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
<%@ page import="hello.*,
|
|
|
java.util.*" %><%@ page session="false" %><%
|
|
|
|
|
@@ -15,10 +16,11 @@ List<Fortune> fortunes = (List)request.getAttribute("fortunes");
|
|
|
<th>id</th>
|
|
|
<th>message</th>
|
|
|
</tr>
|
|
|
-<% for (Fortune fortune : fortunes) { %><tr>
|
|
|
-<td><%= fortune.getId() %></td>
|
|
|
-<td><%= Common.render(fortune.getMessage()) %></td>
|
|
|
+<c:forEach var="o" items="${fortunes}">
|
|
|
+<tr>
|
|
|
+<td><c:out value="${o.getId()}" /></td>
|
|
|
+<td><c:out value="${o.getMessage()}" /></td>
|
|
|
</tr>
|
|
|
-<% } %>
|
|
|
+</c:forEach>
|
|
|
</table></body>
|
|
|
-</html>
|
|
|
+</html>
|