Hi,
Do you still have those errors if you replace your code with the following?
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
javax.sql.DataSource ds = ctx.lookup("java:comp/env/jdbc/cl");
javax.sql.Connection con = ds.getConnection();
Rik
Within my code I attempt to access the pool as follows:
InitialContext ctx = new InitialContext();
DataSource ds = ctx.lookup("java:comp/env/jdbc/cl");
Connection con = ds.getConnection();
When the page executes I receive the following errors:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp
Generated servlet error:
InitialContext cannot be resolved to a type
An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp
Generated servlet error:
InitialContext cannot be resolved to a type
An error occurred at line: 12 in the jsp file: /demo/pooltest.jsp
Generated servlet error:
DataSource cannot be resolved to a type
Could someone tell me what I've done incorrectly? The process seems
straightforward, but I've done something incorrectly.
Thanks,
Bob