The Loader Component
The Loader element represents the web
application class loader that will be used to load Java
classes and resources for your web application. Such
a class loader must follow the requirements of the Servlet
Specification, and load classes from the following locations:
- From the
/WEB-INF/classes directory inside your
- From JAR files in the
inside your web application.
- From resources made available by Catalina to all web
A Loader element MAY be nested inside a Context
component. If it is not included, a default Loader configuration will be
created automatically, which is sufficient for most requirements.
For a more in-depth description of the class loader hierarchy
that is implemented by Catalina, see FIXME - Reference.
The description below uses the variable name $CATALINA_HOME
to refer to the directory into which you have installed Tomcat 4,
and is the base directory against which most relative paths are
resolved. However, if you have configured Tomcat 4 for multiple
instances by setting a CATALINA_BASE directory, you should use
$CATALINA_BASE instead of $CATALINA_HOME for each of these
All implementations of Loader
support the following attributes:
Java class name of the implementation to use. This class must
If not specified, the standard value (defined below) will be used.
true if you want the class loader to follow
the standard Java2 delegation model, and attempt to load classes from
parent class loaders before looking inside the web
application. Set to
false (the default) to have the
class loader look inside the web application first, before asking
parent class loaders to find requested classes or resources.
true if you want Catalina to monitor classes in
changes, and automatically reload the web application if a change
is detected. This feature is very useful during application
development, but it requires significant runtime overhead and is
not recommended for use on deployed production applications. You
can use the Manager web
application, however, to trigger reloads of deployed applications
NOTE - The value for this property will be
inherited from the
reloadable attribute you set on
the surrounding Context component,
and any value you explicitly set here will be replaced.
The standard implementation of Loader is
It supports the following additional attributes (in addition to the
common attributes listed above):
The number of seconds between checks for modified classes and
reloadable has been set to
true. The default is 15 seconds.
The level of debugging detail logged by this Engine
to the associated Logger. Higher numbers
generate more detailed output. If not specified, the default
debugging detail level is zero (0).
Java class name of the
implementation class to use. If not specified, the default value is