Hi, Tomcat4 doesn't use CLASSPATH to find libraries. You have to put your classes12.jar either to $CATALINA_HOME/common/lib or to WEB-INF/lib of your web-application. And one more thing it MUST be jar, so you have to rename your classes12.zip to classes12.jar.
Anton > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 21, 2002 5:58 PM > To: [EMAIL PROTECTED] > Subject: 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:$PA > TH:$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: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
