Ziggy wrote:
No i dont have driver specific code. But something like this raises
compilation errors as the jar file that includes the Connection,
PreparedStatement and ResultSet objects is not accessible from the
WEB-INF/lib folder.

Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)
envCtx.lookup("jdbc/EmployeeDB");

Connection conn = ds.getConnection();

PreparedStatement lv_pstmt = null;
ResultSet lv_rs = null;

To be able to compile the above, the jdbc driver in Tomcat/common/lib has to
be in the classpath i guess.
These are standard J2SE interfaces from java.sql package. There's no need to include any additional jars to compile such code.

--
Mikolaj Rydzewski <m...@ceti.pl>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to