Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
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

view_one 본문

JSP/DBCP

view_one

GAWON 2023. 6. 1. 18:44
<%@page import="org.joonzis.ex.GreenVO"%>
<%@page import="org.joonzis.ex.GreenDao"%>
<%@ 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>회원 정보 보기</title>
</head>
<body>
	<jsp:include page="index.jsp"/> <br /><hr /><br />
	
	<%
		request.setCharacterEncoding("UTF-8");
		String id = request.getParameter("id");
		
		GreenDao dao = GreenDao.getInstance();
		GreenVO vo = dao.getSelectOne(id);
		
		pageContext.setAttribute("vo", vo);
	%>
	<div>
		<h1>${param.id } 회원의 정보</h1>					<!-- 리퀘스트로 전달받았으니 param으로 읽어온다!! -->
		<table>
			<thead>
				<tr>
					<th>순번</th>
					<th>아이디</th>
					<th>비밀번호</th>
					<th>성명</th>
					<th>나이</th>
					<th>주소</th>
					<th>가입일</th>
				</tr>
			</thead>
			<tbody>
				 <c:if test="${vo ne null}">		  	 <%-- == if(dto != null) --%>
				 	<tr>
						<td>${vo.idx }</td>
						<td>${vo.id }</td>
						<td>${vo.pw }</td>
						<td>${vo.name }</td>
						<td>${vo.age }</td>
						<td>${vo.addr }</td>
						<td>${vo.reg_date }</td>
					</tr>
				</c:if> 				 
				<c:if test="${vo eq null}">			<%-- == if(dto == null) --%>	 
					<tr>
						<td colspan="7">${param.id } 회원의 정보가 없습니다.</td>
					</tr>
				</c:if>		 				
			</tbody>
		</table>
	</div>
</body>
</html>

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

MANIFEST.MF  (0) 2023.06.01
Context.xml  (0) 2023.06.01
view_all  (0) 2023.06.01
update  (0) 2023.06.01
update_page  (0) 2023.06.01