aspose file tools
The moose likes JSF and the fly likes how to include db2jcc.jar and db2jcc_license_cu.jar   (db2 driver) into my project Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "how to include db2jcc.jar and db2jcc_license_cu.jar   (db2 driver) into my project" Watch "how to include db2jcc.jar and db2jcc_license_cu.jar   (db2 driver) into my project" New topic
Author

how to include db2jcc.jar and db2jcc_license_cu.jar (db2 driver) into my project

mohamed sheta
Greenhorn

Joined: Jan 05, 2011
Posts: 4
i want to connect db2 with java or jsf . i get the driver from \DB2 installation\java and i dont know how can i include it
Cesar Loachamin
Ranch Hand

Joined: Dec 25, 2010
Posts: 90

Hi Mohamed.

If you want to use JSF, you must put your drives in the lib folder of your web project. WEB-INF/lib/db2jcc.jar and WEB-INF/lib/b2jcc_license_cu.jar.
And if you want to use these drivers in a java program you need to set the classpath to the forlder of your jars.

Regards

Cesar


When a dream is ending because to come true - OCPJP 6,7. OCE JPA EE6. MCTS
mohamed sheta
Greenhorn

Joined: Jan 05, 2011
Posts: 4
Cesar Loachamin wrote:Hi Mohamed.

If you want to use JSF, you must put your drives in the lib folder of your web project. WEB-INF/lib/db2jcc.jar and WEB-INF/lib/b2jcc_license_cu.jar.
And if you want to use these drivers in a java program you need to set the classpath to the forlder of your jars.

Regards

Cesar


Thankssssssss Cesarr
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14568
    
    7

Actually, in almost all cases, you should NEVER put the jdbc drivers ANYWHERE in your WAR. Doing so limits flexibility and may add licensing restrictions to redistribution of the WAR.

Normally you install the JDBC drivers into the appserver's library directory instead of the webapp. For example, in Tomcat 6, that would be TOMCAT_HOME/lib.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to include db2jcc.jar and db2jcc_license_cu.jar (db2 driver) into my project
 
Similar Threads
JDBC driver,Tomcat,DB2 Problem
JSP DB2 Driver WebSphere
Unexpected Exception
JDBC driver,Tomcat,DB2 Problem
jdbc, db2, no suitable driver, linux