I am building a web application using Tomcat 4.1.18, Struts 1.1 b3 and MSSQL. I have 
used Struts 1.0 in the past and configured the datasources in struts-config.xml file. 
This is my first attempt at using Struts 1.1 b3 and datasource configurations in the 
struts-config.xml file have been deprecated. I tried to configure the datasource using 
JNDI several times with no luck. I repeatedly got ClassNotFoundExceptions on the MSSQL 
driver class. I tried placing the MSSQL jars in the WEB-INF/lib of my web app, in the 
server/lib and in the shared/lib. Finally I tried creating a JSP and doing a 
Class.forName(). The JSP could find the class so I realized after many hours of trial 
and error it must be a Classloader issue. I finally found the common/lib directory and 
that worked. After thinking about it I realize the issue and that the common/lib jars 
must be in a different Classloader. However, I am wondering if there is an issue with 
the way commons-dbcp locates and loads classes. Requiring database jars to reside in 
the common/lib and not in the web applications WEB-INF/lib reduces flexibility.


Reply via email to