getting weblogic db connection confusion



Hi, I am noticing some very bizarre behavior in my attempt to get a
database connection from WebLogic. I'm using an older version, 5.1 sp
12, but I'm hopin gyou can help. If I build a JSP page, like so,
everything works great ...

<%@ page import="java.sql.*" %>
<%
Class.forName("weblogic.jdbc20.pool.Driver").newInstance();
Connection conn =
DriverManager.getConnection("jdbc20:weblogic:pool:myPoolName", null);
%>

This compiles and runs fine. But when I put this same code within a
..javaq file,

public class Test
{
public static Connection getConnection(String poolName) {
try {

Class.forName("weblogic.jdbc20.pool.Driver").newInstance();
Connection conn =
DriverManager.getConnection("jdbc20:weblogic:pool:" + poolName, null);
return conn;
} catch (ClassNotFoundException cnfe) {
throw new RuntimeException("Class not found: "
+ cnfe.getMessage());
} catch (Exception ex) {
throw new RuntimeException(ex.getMessage());
}
}
} // Test

and then build a JSP consisting of

<%@ page import="java.sql.*" %>
<%@ page import="com.hrw.support.db.*" %>
<%
Connection c = Test.getConnection("myPoolName");
%>

a ClassNotFoundException is thrown from within the getConnection method
of the Test class. Any ideas on what could be going on?

Thanks, - Dave

.