Java Reference
In-Depth Information
Language (EL) makes it simpler to access JavaBean properties. The conditional and itera-
tor tags provide consistent syntax to access data from collection objects such as List , Map ,
and arrays. Another important feature of JSTL is the support for i18n with locale-sensitive
messages and formatting tags. Listing 3-49 shows JSTL tags in action, iterating through a
policy search result returned as a list of PolicyDetail objects.
Listing 3-49. policydetails.jsp
<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="fmt" uri="" %>
<form name="policysearch" action="">
<%-- The search criteria inputs are not shown for simplicity --%>
<td>Policy Id</td>
<td>First Name</td>
<td>Last Name</td>
<c:forEach var="policyDtl" items="${policyDtlList}" >
<td><c:out value="${policyDtl.policyId}"/></td>
<td><c:out value="${policyDtl.firstName}"/></td>
<td><c:out value="${policyDtl.lastName}"/></td>
<td><c:out value="${policyDtl.age}"/></td>
Search WWH ::

Custom Search