For Tomcat, use classes12.zip & tyrex-0.9.7.0.jar which are kept under Tomcat/common/lib
Its better to use tyrex i.e Tomcat through its JNDI, otherwise it gives a problem getting connection.
To use tyrex, your code should be
/* This method is called by the Store to a get a DB connection. */
public static java.sql.Connection createConnection() {
/** To get the DataSource object for a DB connection using tyrex package
* (tyrex.jar)
*/
tyrex.jdbc.xa.EnabledDataSource dataSource = null;
/** To get the Connection object
*/
Connection conn = null;
try {
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env"

;
// Look up our data source
//dataSource = (DataSource)envCtx.lookup("jdbc/NecAPP"

;
dataSource = (tyrex.jdbc.xa.EnabledDataSource)envCtx.lookup("jdbc/NecAPP"

;
// Allocate and use a connection from the pool
conn = dataSource.getConnection();
NECPCLogger.logMessage("3", "Connected to the database",ConnectionManager.class);
}
catch (Exception e)
{
e.printStackTrace();
NECPCException.logException("5", "Exception in ConnectionManager.createConnection()", ConnectionManager.class, e);
}
return conn;//returns a DB connection from the Connction pool
}//end of method createConnection
The server.xml & web.xml under Tomcat/conf are updated accordingly.