<%@page contentType="text/html; charset=euc-kr"%> <%@page import="java.sql.*"%> Database Programming

Pooling 기법

<% ConnectionPool pool = ConnectionPool.getConnectionPool(); Connection conn = pool.getConnection(); Statement stmt = conn.createStatement(); String sql = "select * from NovelJSP"; ResultSet rs = stmt.executeQuery(sql); %> <% while(rs.next()) { out.print(""); out.print(""); out.print(""); out.print(""); } %>
이름 나이
" + rs.getString(1) + "" + rs.getInt(2) + "
<% pool.releaseConnection(conn); %>