3.8 ExibirHistorico.jsp
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page import="br.aiec.negocio.Pessoa"%> <%--Importando as taglibs core e formating JSTL --%> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%--Alterando o locale --%> <fmt:setLocale value="${idioma}" /> <%--Definindo o pacote.nomeArquivo (fqdn) das mensagens --%> <fmt:setBundle basename="br.aiec.i18n.text"/> <!DOCTYPE html> <html lang="${idioma}"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> <fmt:message key="site.titulo"/> </title> </head> <body> <h1> <fmt:message key="site.titulo.historico"/> </h1> <table border="1"> <thead> <tr> <td><fmt:message key="site.campo.indice"/></td> <td><fmt:message key="site.campo.nome"/></td> <td><fmt:message key="site.campo.dataNascimento"/></td> <td><fmt:message key="site.campo.idade"/></td> </tr> </thead> <tbody> <%--Esse laço percorre a lista de visitantes, exibindo cada um deles --%> <c:forEach var="pessoa" items="${historyVisits}" varStatus="i"> <tr> <td>${i.count}</td> <td>${pessoa.nome}</td> <td><fmt:formatDate pattern="dd/MM/yyyy" value="${pessoa.dataNascimento}" /></td> <td>${pessoa.idade}</td> </tr> </c:forEach> </tbody> </table> </body> </html>