Hi all, I DON'T KNOW HOW TO CONFIGURE TOMCAT TO WORK WITH JDBC. My web application used servlet,jsp with Tomcat. I need to do a lot of database calls. My tomcat is not recognising my environment. What all do I need to do for having tomcat call the database ? Please help me == urgent Maya
Joined: Oct 16, 2001
Hi Maya, Just a thought... Hope u have the CLASSPATH set so that it inclues the correct JDBC classes for the database. eg -------------------------------------------- CLASSPATH=d:\oracle\jdbc\lib\classes12.zip ------------------------------------------ for the oracle database. So depending on what database u are using including the correct classpath may solve the problem. Once again this is just a thought. Try and give a little more desc on the problem... Regards
Joined: Jul 31, 2001
Abraham, Thanks for the response. My problem is this, In my machine I do have Oracle installed in my c: drive and the CLASSPATH is set correctly. Now for my servlet to work, the servlet engine tomcat is in opur server and I have a drive mapped to the server where I create my files. The drive is I: Now , my servlet needs to use JDBC. It has a statement for getting the connection to the database in my machine. So as per a doc, I added classes.zip, the zip file with the Oracle driver in the /lib directory of Tomcat. I added even that directory in my classpath,... Now I am testing with a URL thru our server which runs tomcat. But I am not getting the connection, or the driver is not getting recognised... Any help Maya
Joined: Jul 11, 2001
Did you check the JDBC configuration info in the server.xml file of Tomcat? Beksy
A stack trace of the error would be really beneficial.
You say: "But I am not getting the connection, or the driver is not getting recognised..."
Well, which one? They are different errors with (probably) different causes. Driver not being loaded is usually a classpath thing. Connection is usually a bad JDBC URL.
Joined: Sep 05, 2001
It could also because of a version mismatch. Did you check the compatibility of your driver against JDK/JDBC version ?
Joined: Oct 19, 2001
Hi maya, Can u help me how u have linked servlet pages to jsp. I am using res.sendRedirect(urlString) but it din't work to link servlet to jsp.Is there any other way to link the same. My servlet & jsp pages are stored in different directory.I am using weblogic server. Thanks.