Client Technologies/Bootstrap
Bootstrap : jsp table List template
Korean Eagle
2020. 6. 7. 19:49
728x90
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>Spring Web MVC Student Home</title>
</head>
<body>
<div class="container">
<h1 class="display-4 text-center">Locations</h1>
<div class="row mt-4">
<table class="table table-dark">
<thead class="thead-light text-center">
<tr>
<th>ID</th>
<th>Code</th>
<th>Name</th>
<th>Type</th>
<th>Actions</th>
</tr>
</thead>
<tbody class="text-center">
<c:forEach var="location" items="${ locations }">
<tr>
<td>${ location.id }</td>
<td>${ location.code }</td>
<td>${ location.name }</td>
<td>${ location.type }</td>
<td>
<a href="${ pageContext.request.contextPath }/deleteLocation?id=${location.id}"
class="btn btn-danger btn-sm">Delete</a> |
<a href="${ pageContext.request.contextPath }/showUpdate?id=${location.id}"
class="btn btn-danger btn-sm">Edit</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<a href="${ pageContext.request.contextPath }/showCreate" class="btn btn-info">Add Location</a>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous">
</script>
</body>
</html>
728x90