This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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
Abraham Jacob
Greenhorn
Joined: Oct 16, 2001
Posts: 25
posted
0
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
Shreya Menon
Ranch Hand
Joined: Jul 31, 2001
Posts: 285
posted
0
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
Beksy Kurian
Ranch Hand
Joined: Jul 11, 2001
Posts: 254
posted
0
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.
Mahesh Rana
Ranch Hand
Joined: Sep 05, 2001
Posts: 139
posted
0
It could also because of a version mismatch. Did you check the compatibility of your driver against JDK/JDBC version ?
SCJP2
prashant wath
Greenhorn
Joined: Oct 19, 2001
Posts: 9
posted
0
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.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.