Connect MySQL using JDBC

To connect MySQL using JDBC mysql-connector-java-{version}-bin.jar should be available in your class path. You could Google and download this jar and include in your class path.

JDBC select statement

To select record from table using jdbc select statement you can execute select query against the database which will fetch all record in ResultSet object and once you get ResultSet object you could iterate it to get all records as … Continue reading

JNDI Datasource Tomcat

JNDI Datasource Tomcat This tutorial will show you how to configure JNDI data source to tomcat server and get connection through your program using configured JNDI name. (Note: below example has been done for MySQL database)