Tagged: tomcat

Tomcat Logo 0

Add Connection Pool with auto connection cleanup functionality for Tomcat 7 and MySQL

Since we don’t want to use external classes or libraries to handle database connections for our web applications we should stick to what comes built-in with the container server – in my case Apache Tomcat 7 and MySQL database server. To keep the database connection pooling and cleanup functionality on...

Tomcat Logo 2

Tomcat 7 Fails to load Resource Factory class

In case you get the exception Could not load resource factory class when trying to retrieve the Connection object from the JDBC connection resource pool based on the factory class org.apache.tomcat.jdbc.pool.DataSourceFactory make sure to check if tomcat-jdbc.jar is installed in the tomcat/lib directory. Please note that this file is not...

Ant Target for Creating JAR Files 0

Ant Target for Creating JAR Files

Sometimes it comes in handy to have an ANT target for creating JAR files of your project, e.g. to be able to export it to some other location or project. The following code serves as reference to achieve this behavior. It consists of 6 basic steps: call compile target delete...