tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rachel Greenham <rachel.green...@enetgroup.co.uk>
Subject Re: Where should i set the CLASSPATH
Date Fri, 01 Sep 2000 09:52:09 GMT
> Stefan Urban wrote:
> 
> Hi,
> 
> I have still a problem to set the CLASSPATH-Variable for Servlets.
> The Problem is the following:
> 
> I have a servlet that imports several Classes from a JAR-Archive. Of
> course
> i put this file explicit on the CLASSPATH. Now I'm starting TOMCAT and he
> shows me the right CLASSPATH. When I'm starting now the servlet (i have
> got
> an Applet as the client) everything works fine. The servlet itselfs
> connects to a database. (This is a well-known Model) Until here, no
> problems. One day later I
> restart the Applet again and... an exception apears which says:
> 
> ClassNotFoundException (?!?!?!)

While ensuring the CLASSPATH is set before invoking Tomcat does work,
another way, which is actually more proper, is to put the JAR files you need
into the /WEB-INF/lib directory off your htdocs root. All JARs put there
will be added to the classpath for that web application alone.

-- 
Rachel

Mime
View raw message