establish JNDI DataSource in web.xml with test example in index.jsp; also JNDI DataSource need to be configured by adding TOMCAT_HOME/conf/context.xml file (example: http://tomcat.apache.org/tomcat-7.0-doc/jndi-datasource-examples-howto.html); com.mysql.jdbc.Driver is desirable in TOMCAT_HOME/libs/ directory, so let Tomcat Common class loader (more about Tomcat class loaders: http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html) make it visible to both Tomcat internal classes and to all web applications