Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes URGENT HELP NEEDED Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "URGENT HELP NEEDED" Watch "URGENT HELP NEEDED" New topic
Author

URGENT HELP NEEDED

Shreya Menon
Ranch Hand

Joined: Jul 31, 2001
Posts: 285
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
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
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
Did you check the JDBC configuration info in the server.xml file of Tomcat?
Beksy
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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
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
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://aspose.com/file-tools
 
subject: URGENT HELP NEEDED