<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>

<%@ page import="java.sql.*"%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.DriverManager"%>
<%@ page import="java.sql.PreparedStatement"%>
<%@ page import="java.sql.ResultSet"%>
    <%@ page session = "true" %>
<% request.setCharacterEncoding("UTF-8"); %>
<!DOCTYPE html>
<html>
<head>
<meta charset="EUC-KR">
<title>Insert title here</title>
</head>
<body  bgcolor="#D5D5D5" style="text-align : center;">
<table border=1>
<tr>
<th>아이디</th>
<th>비밀번호</th>
<th>이름</th>
</tr>
<%
	ResultSet rs=null;
	try{
		Class.forName("oracle.jdbc.driver.OracleDriver");
		 Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@168.126.146.45:1521:orcl","20162510","950505");
		 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>
<A href="main.jsp" >홈으로 </p>
</body>
</html>