You are on page 1of 1

<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Teacher Management</title>
</head>
<body>
<h1>Teacher Management</h1>
<form action="TeacherServlet" method="post">
<input type="hidden" name="action" value="add">
<label for="lecturerName">Lecturer Name:</label>
<input type="text" id="lecturerName" name="lecturerName" required>
<input type="submit" value="Add Teacher">
</form>

<table>
<tr>
<th>Lecturer ID</th>
<th>Lecturer Name</th>
<th>Actions</th>
</tr>
<c:forEach items="${teacherList}" var="teacher">
<tr>
<td>${teacher.lecturerId}</td>
<td>${teacher.lecturerName}</td>
<td>
<form action="TeacherServlet" method="post" style="display:
inline-block;">
<input type="hidden" name="action" value="update">
<input type="hidden" name="lecturerId" value="$
{teacher.lecturerId}">
<input type="text" name="lecturerName" value="$
{teacher.lecturerName}" required>
<input type="submit" value="Update">
</form>
<form action="TeacherServlet" method="post" style="display:
inline-block;">
<input type="hidden" name="action" value="delete">
<input type="hidden" name="lecturerId" value="$
{teacher.lecturerId}">
<input type="submit" value="Delete">
</form>
</td>
</tr>
</c:forEach>
</table>
</body>
</html>

You might also like