Subject Re: [Firebird-Java] Firebird, JDBC and Tomcat
Author Rick Fincher
Hi David,

This varis a little with older versions of Tomcat but I'm going to assume
that you are using Tomcat version 4.1.x.

Typically you need to put the jar for your jdbc driver in the Tomcat
directory (represented by $CATALINA_HOME) under common\lib. This makes the
files available to any web app running under Tomcat.

CLASSPATH is a name that the system uses to look for Java class files. It is
called an environment variable because the system, in this case Win 2000,
uses it to find stuff.

With Tomcat you don't have to worry so much about setting CLASSPATH, but you
do have to set CATALINA_HOME and JAVA_HOME.

Since you can run Tomcat those things are probably already set in your
system. If you want to confirm this I put directions at the end of this
e-mail for that.

What is the web appyou are running? Is it using a data source, or accessing
the database directly from within its code?

If it is running as a data source your web app should have instructions
about how to modify the configuration file in the Tomcat directory
conf\server.xml.

If it is used directly in your web app you will have to put info either in
the file WEB-INF\web.xml or directly in one of your JSP pages telling it
what the name of the driver is that the web app will use to access the
database.

If you can post the WEB-INF\web.xml file it would help too.

Rick

Environ Variable info for Win 2000:

If you want to verify your system variables you can go to the control panel,
double-the icon called System, you should see a utility window open called
"System Properties". Click on the tab called "Advanced" in that window.

In the middle of that page you should see a button called "Environment
Variables..." click it and you will see a list of user variables and system
variables.

JAVA_HOME tells the system where to find Java. In my case it is set to
c:\j2sdk1.4,1_01.

CATALINA_HOME tells the Java where to find Tomcat's files. It might be
c:\jakarta\tomcat or something like that.

You need to put these under System or User depending on whether you are
running Tomcat as "Administrator" or some other user.



----- Original Message -----

> Hi
>
> I am trying to configure Firebird and a JDBC driver for access by a
> JSP application hosted by Tomcat. I am having difficulty in getting
> it all to work. Firebird is up and running as a service, and Tomcat
> runs the JSP app, but the app fails to connect to the database. I am
> rather baffled by things like CLASSPATH etc, and where the client
> should be installed. I am using Win2000.
>
> The JSP app's documentation recommends using InterClient. What I
> would like is a systematic description of how to install InterClient
> and how to test it by using some kind of supplied utility. I have not
> found much useful documentation for this. Any suggestions please?
>
> Then, I would need to test the JDBC connectivity. How could I do
> that independently of my JSP application?
>
> I have been advised to use JayBird instead of InterClient. However,
> it seems to me that JayBird is just a JDBC driver, and is not
> supplied with any utilities that I can run for tests. Any comments?
>
> Thanks.