tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: Tomcat 3.3 classpath
Date Wed, 24 Oct 2001 16:55:49 GMT
The ":staticClasspath" portion of tomcat.bat is executed only for
the "env" and "jspc" actions, but not for "start" and the others.
They use just: "set CLASSPATH=%TOMCAT_INSTALL%\lib\tomcat.jar".

However, adding classes via the CLASSPATH is more often than not,
a source of problems.  A lot depends on how those classes will be
used and what other classes need to be visible to those classes.

Here are the recommended methods for adding class files in order
of preference (assuming you don't want to put them in a webapp's
WEB-INF/classes directory):

1) Create a "classes" directory under "lib/container",
"lib/common", or "lib/apps" as desired, and place the classes
under there.  The "classes" directory will be included in the
corresponding classloader.  This method hasn't made it into
the documentation yet.

2) Specify your classpath entry in one of the following Java
System properties:

    org.apache.tomcat.common.classpath  - Common classloader
    org.apache.tomcat.apps.classpath    - Apps classloader.

On NT and Win2k, you can use the TOMCAT_OPTS environment
variable to accomplish this, i.e.

    set TOMCAT_OPTS=-Dorg.apache.tomcat.apps.classpath=d:\

This won't work on Win98 because it doesn't like the '='
inside the environment variable value.  You will need to
add the "-D..." to the tomcat.bat command that executes java.

3) Modify the tomcat.bat to set the CLASSPATH differently.

Hope this helps.

Larry


> -----Original Message-----
> From: Hornsby Peter [mailto:PHORNSBY@qinetiq.com]
> Sent: Wednesday, October 24, 2001 4:36 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Tomcat 3.3 classpath
> 
> 
> Cheers for the earlier suggestion on the problems with using 
> Saxon, I've
> now installed Tomcat 3.3 and that problem has disappeared.  However:
> Tomcat is installed in d:\tomcat3.3.  I want to reference some class
> files in d:\.  I've tried editing the :staticClasspath part of
> tomcat.bat, putting the line 
> 
> set CLASSPATH=%CLASSPATH%;d:\
> 
> at the end, but this doesn't seem to resolve the 
> problem...any thoughts?
> 
> Cheers,
> Pete
> 
> 
> -- 
> The Information contained in this E-Mail and any subsequent 
> correspondence
> is private and is intended solely for the intended recipient(s).
> For those other than the recipient any disclosure, copying, 
> distribution, 
> or any action taken or omitted to be taken in reliance on 
> such information is
> prohibited and may be unlawful.
> 

Mime
View raw message