<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% request.setAttribute("title", "Bootcamp List"); %>
<%@ include file="head.jsp" %>
<body>
<h1>${sessionScope.get("user")}</h1>
<c:if test="${empty bootcamplist}">
    <p>There are no bootcamps registered.</p>
</c:if>
<c:if test="${not empty bootcamplist}">
<table>
    <p><a href="${pageContext.request.contextPath}/users">Users</a></p>
    <thead>
        <td>Id</td><td>Location</td><td>Start</td><td>End</td>
    </thead>
    <c:forEach var="bootcamp" items="${bootcamplist}">
        <tr>
            <td>${bootcamp.id}</td>
            <td>${bootcamp.location}</td>
            <td>${bootcamp.start}</td>
            <td>${bootcamp.end}</td>
        </tr>
    </c:forEach>
</table>
</c:if>
<%@ include file="foot.jsp" %>

