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 <[email protected]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to