<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.PreparedStatement" %>
<%@ page import="java.sql.ResultSet" %>

<% request.setCharacterEncoding("UTF-8"); %>
<!DOCTYPE html>
<html>
<head>
<title>회원전체</title>
</head>
<body>
<table border=1 align="center">
<tr>
<th>아이디</th>
<th>패스워드</th>
<th>이름</th>
</tr>
<h3><div align="center">전체회원목록</div></h3>
<%
ResultSet rs=null;
try{
	Class.forName("oracle.jdbc.driver.OracleDriver");
	Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@168.126.146.45:1521:orcl", "20182236", "990319");
	PreparedStatement pstmt=conn.prepareStatement("select * from o_member");
	rs=pstmt.executeQuery();
	
	while(rs.next()){
		String id=rs.getString("id");
		String password=rs.getString("password");
		String name=rs.getString("name");
		%>
		<tr>
		<td><%=id %></td>
		<td><%=password %></td>
		<td><%=name %></td>
		</tr>
	<%}
}catch(Exception e){
	e.printStackTrace();
}
%>
</table>
<p>
<div align="center">
<a href="http://localhost:8080/member_20182236/p_member/loginForm.jsp">로그인하세요!</a></p>
<a href="http://localhost:8080/member_20182236/p_member/main.jsp">메인으로 돌아가기</a></p>
</div>
</body>
</html>