Skip to content

Instantly share code, notes, and snippets.

@mmafrar
Created April 2, 2021 15:38
Show Gist options
  • Save mmafrar/becebb7016745e314f040841560e7059 to your computer and use it in GitHub Desktop.
Save mmafrar/becebb7016745e314f040841560e7059 to your computer and use it in GitHub Desktop.
Implementing Spring Boot MVC CRUD operations with JPA and JSP
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h1>Read Contacts</h1>
<table border="2" width="70%" cellpadding="2">
<tr>
<th>Id</th>
<th>Name</th>
<th>Email</th>
<th>Country</th>
<th>Update</th>
<th>Delete</th>
</tr>
<c:forEach var="contact" items="${contacts}">
<tr>
<td>${contact.id}</td>
<td>${contact.name}</td>
<td>${contact.email}</td>
<td>${contact.country}</td>
<td><a href="/update-contact/${contact.id}">Update</a></td>
<td><a href="/delete-contact/${contact.id}">Delete</a></td>
</tr>
</c:forEach>
</table>
<br/>
<a href="/create-contact">Create Contact</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment