
<%@ 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" %>
<%@ page session="true" %>

<% request.setCharacterEncoding("utf-8");%>

 <html>
 <head>
 <style type="text/css">
#main_menu {

	font-size:12px;
	color:black;
	
	background-color:lightgreen;
	margin-top:15px;
	padding:12px;
	text-align:center;
}
#main_menu li{
	padding:0 20px 0 20px;
	display:inline;
}

</style>
 </head>
 <body bgcolor="lightblue"> 
 <ul id="main_menu">
<li><a href="http://localhost:8080/Test_Project/aa/list.jsp">전체회원 목록보기</a></li>
<li><a href="http://localhost:8080/Test_Project/aa/editForm.jsp">회원정보 수정</a></li>
<li><a href="http://localhost:8080/Test_Project/aa/deleteForm.jsp">회원탈퇴</a></li>
<li><a href="http://localhost:8080/Test_Project/aa/Logout.jsp"><input type="submit" value="로그아웃"></a></li> 
</ul>
<center>
<form id="a">
<h2> 회원목록</h2>
<table border=1>
<tr>
<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","20182226","991214");
		PreparedStatement pstmt=conn.prepareStatement("select * from MEMBER_2A") ;
		rs=pstmt.executeQuery();
		
		while(rs.next()){
			String id=rs.getString("id");
			String name=rs.getString("name");
			 		
			%>
			<tr>
			<td><%= id %></td>
			<td><%= name %></td>
			</tr>
						
		<% }
}catch(Exception e){ 
		e.printStackTrace();
}
%>
</table>
</form>
<a href="http://localhost:8080/Test_Project/aa/aaa.jsp">홈으로 </a>
</center>

  
</body>
</html>
