aspose file tools
The moose likes JDBC and the fly likes Problem with DB2 in Web Project Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Problem with DB2 in Web Project" Watch "Problem with DB2 in Web Project" New topic
Author

Problem with DB2 in Web Project

Nghiem Nguyen
Greenhorn

Joined: Jun 05, 2005
Posts: 25
Hi all,
Now I have a web project with java and DB2, I can connect to DB2 server by console application but not by JSP.
The problem is : "no suitable driver"
I do in the same way and the same drivers.
Please help me.
Sorry for my poor English.
Thanks.
Rock.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You need to put the Jar containing the JDBC Driver for DB2 in you web project. The <context>/WEB-INF/lib directory is a good place to put it.

Dave
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26183
    
  66

Since you are using a server, consider using a DataSource. Then the server can handle the database classpath for you rather than packaging the jar with the application.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Nghiem Nguyen
Greenhorn

Joined: Jun 05, 2005
Posts: 25
Thanks David O'Meara & Jeanne Boyarsky,
I will try to use DataSource althought I don't know it.
Best regards.%
Nghiem Nguyen
Greenhorn

Joined: Jun 05, 2005
Posts: 25
Hi All,
Now I pass it.
Thanks a lot.
Rock
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with DB2 in Web Project
 
Similar Threads
Non-Java files not copied to bin
DB2 v9 slower than DB2 v8 while inserting DDL and DML Scripts using Ant script
jdbc connectivity for db2
DB2 access from browser using JDBC
Insert Problem ! Please Help !