Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

dynamic 본문

JSP/SEARCH

dynamic

GAWON 2023. 6. 12. 17:11
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri = "http://java.sun.com/jsp/jstl/core" prefix="c"%>    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	div{
		width: 800px;
		text-align: center;
		margin: auto;
	}
	table {
		width: 100%;
		border-collapse: collapse;
	}
	th,td{
		border: 1px solid gray;
	}
	th{
		padding: 5px;
		background-color: blue;
		color: white;
	}
</style>
</head>
<body>
	<div>
		<h1>부서별 직원 목록</h1>
		<table>
			<thead>
				<tr>
					<th>직원</th>
					<th>이름</th>
					<th>연락처</th>
					<th>연봉</th>
					<th>부서ID</th>
					<th>고용일</th>
				</tr>
			</thead>
			<tbody>
				<c:choose>
					<c:when test="${not empty list }">
						<c:forEach var ="vo" items="${list }">
							<tr>
								<td>${vo.employee_id }</td>
								<td>${vo.first_name }${vo.last_name}</td>
								<td>${vo.phone_number }</td>
								<td>${vo.salary }</td>
								<td>${vo.department_id }</td>
								<td>${vo.hire_date }</td>
							</tr>	
						</c:forEach>
					</c:when>
					<c:otherwise>
						<tr>
							<td colspan="6">전체 목록보기</td>
						</tr>	
					</c:otherwise>
				</c:choose>
			</tbody>
		</table>
	</div>
</body>
</html>

'JSP > SEARCH' 카테고리의 다른 글

input_dept  (0) 2023.06.12
index  (0) 2023.06.12
daptList  (0) 2023.06.12
allList  (0) 2023.06.12
EmployeeVO  (0) 2023.06.12