▶ WebContent/WEB-INF/view list.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.util.*, vo.People" %>
<%
List<People> list2 = (ArrayList<People>)request.getAttribute("people");
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Select </title>
</head>
<body>
<h1> ■모델 2 , View </h1>
<a href="/index.html">● Home </a>
<p>
<table style="width: 400px;" border="0">
<tr style="height: 40px">
<td>ID</td>
<td align="center">이름</td>
<td align="center">나이</td>
<td align="center">등록일자</td>
<td> 삭제 </td>
</tr>
<%
String strId;
try{
for(People p : list2){
strId = p.getStrID();
%>
<tr style="height: 40px">
<td><%=strId%></td>
<td align="center"><%=p.getStrName()%></td>
<td align="center"><%=p.getStrAge()%></td>
<td align="center"><%=p.getStrDati()%></td>
<td><a href="/DeletePeople?id=<%=strId%>">삭제 </a></td>
</tr>
<%
}
}catch (Exception e) {
System.out.println("Error =>"+e);
}finally {
}
%>
</table>
</body>
</html>
'고인돌 프로젝트 > [Step 2] 모델2(MVC) Servlet' 카테고리의 다른 글
7. [번외] Was (tomcat) 배포 (1) | 2021.08.06 |
---|---|
6. view 작성 (0) | 2021.08.06 |
5. Servlet , beans 등록 (0) | 2021.08.06 |
4. DB(Oracle) 작업 (0) | 2021.08.06 |
2. 프로젝트 생성 (2) | 2021.08.06 |