>    <%
>    javax.naming.Context context = new javax.naming.InitialContext();
>    javax.sql.DataSource dataSource =
>        (javax.sql.DataSource) context.lookup("jdbc/OracleDS");
>    java.sql.Connection conn = dataSource.getConnection();
>    java.sql.Statement stmt = conn.createStatement();
>    java.sql.ResultSet rs = stmt.executeQuery("select table_name from user_tables");
>    while(rs.next()) {
>     out.println(rs.getString(1));
>    }
>    %>
Ok, that's the JSP's way of using data source.
But how to use it in the tag lib?
Do we have to install JNDI first?
And what should we import?

==========================
Lynch Wu
Web Engineer
pAsia Inc. <http://www.pAsia.com>
TEL: 886-2-87883033 ext 347
FAX: 886-2-87881532
==========================


Reply via email to