I am using the sample code found here to implement Connection Pooling for my webapp: http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html#Plain_Ol'_Java
Since I am using PostgreSQL as my database, I changed the line which says p.setDriverClassName("com.mysql.jdbc.Driver"); to p.setDriverClassName("org.postgresql.Driver");.
All I get is a ClassNotFoundException. Where have I gone wrong? Is there any other way?
EDIT: If I don't use connection pooling and do the normal way, I don't get the error.
EDIT 2: This isn't a duplicate of the suggested question. I am using Eclipse and have the jar included in Build Path and Deployment Assembly. As I said, the error doesn't come when NOT doing connection pooling and just manually opening the connection and closing.