Hi, >I am trying to use the DriverAdapterCPDS in DBCP. When I run my eclipse app >standalone to test my class, the cpds.setDriver(strDriver); function works
Running your app in an IDE is not the same as running it standalone, and means you're subject to whatever classpath the IDE assigns. >However, When I kick off tomcat, my classpath is set to Bootstrap.jar (and As the Classloader how-to explains, there are numerous different classpaths within Tomcat. The Bootstrap classpath is not related to your app classpath, and should not contain DBCP or any DB driver jars. >I know this can be solved by putting my driver .jar file in the >tomcat/common/lib directory, but I would prefer not >to do that. I would prefer to have all my project related .jar files in >WEB-INF/lib. Then you must put DBCP there as well, and configure it yourself. The DBCP jar and the DB driver jar should be in the same classloader repository. >Is there a way to change the classpath dynamically? Only if you write your own custom classloader and plug it into Tomcat. But that's more trouble than it's worth usually. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
