231227 HTML index
2023. 12. 27. 19:49ㆍ2023.11.21-2024.05.31
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
32
33
34
35
36
37
38
39
40
|
<%@page import="com.sukgi.db.EmployeesDAO"%>
<%@page import="com.sukgi.db.EmployeesDTO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<H1>departments</H1>
<%
EmployeesDAO dao= new EmployeesDAO();
List<EmployeesDTO> list = dao.selectDepartments();
//여기는 자바영역입니다.
%>
<!-- 여기는 html영역입니다. -->
<!-- 단축키 ctrl+ shift +/ -->
<table border="1">
<tr>
<td>dept_no</td>
<td>dept_name</td>
</tr>
<%for(int i =0; i<list.size(); i++){ %>
<tr>
<td><%=list.get(i).getDept_no()%></td>
<td><%=list.get(i).getDept_name()%></td>
</tr>
<%} %>
</table>
<a href="./employees.jsp">직원 목록 보기</a>
오는 값 : <%=list %>
</body>
</html>
|
cs |
'2023.11.21-2024.05.31' 카테고리의 다른 글
글씨체, 배경 색 (1) | 2023.12.28 |
---|---|
231227 HTML employees (0) | 2023.12.27 |
231227 JAVA DepartmentsDAO (0) | 2023.12.27 |
231227 JAVA DepartmentsDTO (0) | 2023.12.27 |
231227 JAVA Test-Employees (0) | 2023.12.27 |