You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jr...@dpt-ltd.co.uk on 2002/02/21 16:58:18 UTC

Tomcat Servlet Setup (NEWBIE)


I apologise in advance for asking this as it has probably been covered countless
times before, but I'm afraid I am a newbie who needs an answer quickly and the
List Archive is currently down!

I have modified the JdbcCheckup.java program so that it connects to our Oracle
server using the Oracle JDBC Driver.  This works perfectly well, but ideally I
want to prompt for the various parameters (username, password etc) via a
webpage, so I'm trying to create a servlet version of my code.

The problem is that for some reason, the servlet version cannot establish a
connection to the DB, even though it is virtually identical to my previous Java
program.  The issue appears to be with the following line of code...

Class.forName ("oracle.jdbc.driver.OracleDriver");

...which I assume means the program cannot find the JDBC Driver.

I realise this is almost certainly a classpath issue, and my classpath is
defined under /root/.bash_profile as follows...

PATH=/usr/java/jdk1.3.1_02/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH:$HOME/bin:/var/tomcat4/common/lib

BASH_ENV=$HOME/.bashrc
USERNAME="root"
CLASSPATH=/usr/java/jdk1.3.1_02/classes12.zip:/var/tomcat4/webapps/james/:/var/tomcat4/common/lib/servlet.jar:/var/tomca

t4/common/lib/classes12.zip:/var/tomcat4/common/lib/zip/classes/:/usr/java/jdk1.3.1_02/lib/tools.jar

export USERNAME BASH_ENV PATH CLASSPATH

Can anyone see where I'm going wrong?  Please reply to me off-list.

Thanks in advance,

James



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>