• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with DB2 in Web Project

 
Nghiem Nguyen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nghiem Nguyen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David O'Meara & Jeanne Boyarsky,
I will try to use DataSource althought I don't know it.
Best regards.%
 
Nghiem Nguyen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Now I pass it.
Thanks a lot.
Rock
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic