You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brett Eveson <be...@efasoftware.com> on 2000/08/19 00:20:47 UTC

Tomcat-Jdbc classpath problem?

I am very green when it comes to all this stuff but here it goes: 
I have Apache 1.3.12 running with Tomcat 3.1 on Win NT machine. 
I am having trouble connecting to a database via Tomcat for a JSP. 
I can access the database through a Java Application and all of my JSP's
are running fine on my local server, it is only when I try and combine
the two when I run into problems??

I have been looking through some other comments and most say that the
jdbc driver or the .jar files must be in a place for Tomcat to see them
(in the TOMCAT_HOME\lib), but if I am using the jdbc driver (jdbc-odbc
bridge) that is shipped with JDK 1.3 then how do I tell Tomcat to use
it, or should I? Or how do I even know what to tell Tomcat to look for,
shouldn't it know where it is already if everything else seems to work?

Sorry if this seems to be a simple question but as I said I am very
green. 
Thanks for any info 
Brett 


RE: Tomcat-Jdbc classpath problem?

Posted by Pétur Sæmundsen <pe...@stofan.is>.
Tomcat-Jdbc classpath problem?    Every package I want  Tomcat to find I put
in the TOMCAT_HOME\lib directory.  By default every package, wich belongs to
the JVM you are using, should be seen by TOMCAT so this is strange.  But if
you want to be sure tomcat is finding the JDBC driver I recommand that you
put it in the TOMCAT_HOME\lib directory.
Pétur

 -----Original Message-----
From: Brett Eveson [mailto:beveson@efasoftware.com]
Sent: Friday, August 18, 2000 10:21 PM
To: 'tomcat-user@jakarta.apache.org!'
Subject: Tomcat-Jdbc classpath problem?


  I am very green when it comes to all this stuff but here it goes:
  I have Apache 1.3.12 running with Tomcat 3.1 on Win NT machine.
  I am having trouble connecting to a database via Tomcat for a JSP.
  I can access the database through a Java Application and all of my JSP's
are running fine on my local server, it is only when I try and combine the
two when I run into problems??

  I have been looking through some other comments and most say that the jdbc
driver or the .jar files must be in a place for Tomcat to see them (in the
TOMCAT_HOME\lib), but if I am using the jdbc driver (jdbc-odbc bridge) that
is shipped with JDK 1.3 then how do I tell Tomcat to use it, or should I? Or
how do I even know what to tell Tomcat to look for, shouldn't it know where
it is already if everything else seems to work?

  Sorry if this seems to be a simple question but as I said I am very green.
  Thanks for any info
  Brett


RE: Tomcat-Jdbc classpath problem?

Posted by Ken Cheung <ke...@mindbond.com>.
Tomcat-Jdbc classpath problem?Dear Brett,

    JDBC drivers usually come with your database instead of JDK. You can
either change the tomcat/bin/tomcat.bat and add it into the classpath OR put
it under your context path/WEB-INF/lib/. which will be loaded as part of
your webapp's classpath. To access database inside JSP, normally you need to
write a Bean for your JSP which calls the jdbc driver to connect to the
database.

    Hope this can help (and hope not saying something wrong... yup!)

Best Regards,

Ken
  -----Original Message-----
  From: Brett Eveson [mailto:beveson@efasoftware.com]
  Sent: Saturday, August 19, 2000 6:21 AM
  To: 'tomcat-user@jakarta.apache.org!'
  Subject: Tomcat-Jdbc classpath problem?


  I am very green when it comes to all this stuff but here it goes:
  I have Apache 1.3.12 running with Tomcat 3.1 on Win NT machine.
  I am having trouble connecting to a database via Tomcat for a JSP.
  I can access the database through a Java Application and all of my JSP's
are running fine on my local server, it is only when I try and combine the
two when I run into problems??

  I have been looking through some other comments and most say that the jdbc
driver or the .jar files must be in a place for Tomcat to see them (in the
TOMCAT_HOME\lib), but if I am using the jdbc driver (jdbc-odbc bridge) that
is shipped with JDK 1.3 then how do I tell Tomcat to use it, or should I? Or
how do I even know what to tell Tomcat to look for, shouldn't it know where
it is already if everything else seems to work?

  Sorry if this seems to be a simple question but as I said I am very green.
  Thanks for any info
  Brett