<%@page import="javax.naming.*, javax.sql.*, java.sql.*;" %> SimplePool JNDI Example <% // Get a new initial JNDI context Context ctx = new InitialContext(); // Get a reference to our JNDI DataSource DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/JNDIPoolDS"); // Get a connection from the pool Connection conn = ds.getConnection(); // Create a new statement Statement stmt = conn.createStatement(); // Execute the query ResultSet rst = stmt.executeQuery("SHOW TABLES"); %>

Tables