On Wed, 2 Jan 2002 16:28:39 -0000, Brian Moynihan <[EMAIL PROTECTED]> wrote:

>The classpath is set up correctly as the standalone java application can
>access the database.
>

The problem is that the servlet container is not able to find the classes. There is a 
difference between the way the standalone application works and the way the servlet 
containers (including Tomcat)work.
The differences are

1. Servlet containers MAY not use the system classpath defined by the CLASSPATH 
environment variable. Tomcat does not use this. This can be done by specifying a 
classpath when invoking the JVM ( -classpath option on java)

2. Servlet container use customized classloaders to find the classes from very 
specific directories. Some of these directories are specified by the servlet 
specification and some are not. All 2.2 & 2.3 spec complaiant servlet containers 
SHOULD load classes from the directory WEB-INF/classes and from the jar files in 
WEB-INF/lib. In addition to these, jar files can also be placed in specific 
directories depending upon the servlet container and these are known as container wide 
library files.

In your case the container would not have been able to find the jdbc driver because 
the necessary files were not there in places looked at by the servlet container.

Hope this helps to clarify the matter a little.

Regds,
Gokul

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to