<%@ 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>
 </head>
 <center>
 <body bgcolor="#D4F4FA">  

  <h2> 회원목록</h2>
  
 <table border = "1" bgcolor = "lightyellow" cellpadding = "5" >
</center>
<tr>
<th>아이디</th>
<th>패스워드</th>
<th>이름</th>
<th>생년월일</th>
<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","20182209","961127");
		PreparedStatement pstmt=conn.prepareStatement("select * from CHANGMIN") ;
		rs=pstmt.executeQuery();
		
		while(rs.next()){
			String id=rs.getString("id");
			String passwd=rs.getString("passwd");
			String name=rs.getString("username");
			 String year = rs.getString("year");
			   String address =rs.getString("address");
			   String email = rs.getString("email");
			   String job =rs.getString("job");
			 		
			%>
			<tr>
			<td><%= id %></td>
			<td><%= passwd %></td>
			<td><%= name %></td>
			<td><%= year%></td>
			<td><%= address %></td>
			<td><%= email %></td>
			<td><%= job %></td>
			 			
			</tr>
						
		<% }
}catch(Exception e){ 
		e.printStackTrace();
}
%>
</table>
<p>
<a href="http://localhost:8080/f/main.jsp">메인창으로!</a>
<p>

</body>

</html>
