Hi there, I am trying to connect to database in java and i succeded using the below details.. connected to IBM DB2 database with java
But the same code fails in a JSP page (when i create a bean object and connect it ) when run on websphere server. Whats wrong?
type = "com.ibm.db2.jcc.DB2Driver";
String url = "jdbc:db2://localhost:50000/POLICE";
(with user name and password)
c = DriverManager.getConnection(url,user,pass);
The error given is "Driver manager not found"
By the way the "lib" folder inside WEB-INF folder is empty (but the class files are there in classes/policeLibrary folder
My bean sentence and java code is as follows
Note: addZone works when run as a standalone java application. And INSIDE addZone my connection to database is called.
<jsp:useBean id="test" class="policeLibrary.Common"></jsp:useBean>