104 lines
8.1 KiB
HTML
104 lines
8.1 KiB
HTML
|
<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference - The Loader Component</title><meta name="author" value="Craig R. McClanahan"><meta name="email" value="craigmcc@apache.org"></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../../images/tomcat.gif" align="right" alt="
|
||
|
The Apache Tomcat Servlet/JSP Container
|
||
|
" border="0"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left"><table border="0" width="100%" cellspacing="4"><tr><td align="left" valign="top"><h1>Apache Tomcat Configuration Reference</h1><h2>The Loader Component</h2></td><td align="right" valign="top" nowrap="true"><img src="../../images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<p>The <strong>Loader</strong> element represents the <em>web
|
||
|
application class loader</em> 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:</p>
|
||
|
<ul>
|
||
|
<li>From the <code>/WEB-INF/classes</code> directory inside your
|
||
|
web application.</li>
|
||
|
<li>From JAR files in the <code>/WEB-INF/lib</code> directory
|
||
|
inside your web application.</li>
|
||
|
<li>From resources made available by Catalina to all web
|
||
|
applications globally.</li>
|
||
|
</ul>
|
||
|
|
||
|
<p>A Loader element MAY be nested inside a <a href="context.html">Context</a>
|
||
|
component. If it is not included, a default Loader configuration will be
|
||
|
created automatically, which is sufficient for most requirements.</p>
|
||
|
|
||
|
<p>For a more in-depth description of the class loader hierarchy
|
||
|
that is implemented by Catalina, see <a href="../../class-loader-howto.html">the ClassLoader HowTo</a>.</p>
|
||
|
|
||
|
<blockquote><em>
|
||
|
<p>The description below uses the variable name $CATALINA_HOME
|
||
|
to refer to the directory into which you have installed Tomcat 6,
|
||
|
and is the base directory against which most relative paths are
|
||
|
resolved. However, if you have configured Tomcat 6 for multiple
|
||
|
instances by setting a CATALINA_BASE directory, you should use
|
||
|
$CATALINA_BASE instead of $CATALINA_HOME for each of these
|
||
|
references.</p>
|
||
|
</em></blockquote>
|
||
|
|
||
|
</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Common Attributes"><strong>Common Attributes</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<p>All implementations of <strong>Loader</strong>
|
||
|
support the following attributes:</p>
|
||
|
|
||
|
<table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>className</code></td><td align="left" valign="center">
|
||
|
<p>Java class name of the implementation to use. This class must
|
||
|
implement the <code>org.apache.catalina.Loader</code> interface.
|
||
|
If not specified, the standard value (defined below) will be used.</p>
|
||
|
</td></tr><tr><td align="left" valign="center"><code>delegate</code></td><td align="left" valign="center">
|
||
|
<p>Set to <code>true</code> if you want the class loader to follow
|
||
|
the standard Java2 delegation model, and attempt to load classes from
|
||
|
parent class loaders <strong>before</strong> looking inside the web
|
||
|
application. Set to <code>false</code> (the default) to have the
|
||
|
class loader look inside the web application first, before asking
|
||
|
parent class loaders to find requested classes or resources.</p>
|
||
|
</td></tr><tr><td align="left" valign="center"><code>reloadable</code></td><td align="left" valign="center">
|
||
|
<p>Set to <code>true</code> if you want Catalina to monitor classes in
|
||
|
<code>/WEB-INF/classes/</code> and <code>/WEB-INF/lib</code> for
|
||
|
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 <a href="../../manager-howto.html">Manager</a> web
|
||
|
application, however, to trigger reloads of deployed applications
|
||
|
on demand.</p>
|
||
|
|
||
|
<p><strong>NOTE</strong> - The value for this property will be
|
||
|
inherited from the <code>reloadable</code> attribute you set on
|
||
|
the surrounding <a href="context.html">Context</a> component,
|
||
|
and any value you explicitly set here will be replaced.</p>
|
||
|
</td></tr></table>
|
||
|
|
||
|
</blockquote></td></tr></table>
|
||
|
|
||
|
|
||
|
<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Standard Implementation"><strong>Standard Implementation</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<p>The standard implementation of <strong>Loader</strong> is
|
||
|
<strong>org.apache.catalina.loader.WebappLoader</strong>.
|
||
|
It supports the following additional attributes (in addition to the
|
||
|
common attributes listed above):</p>
|
||
|
|
||
|
<table border="1" cellpadding="5"><tr><th width="15%" bgcolor="#023264"><font color="#ffffff">Attribute</font></th><th width="85%" bgcolor="#023264"><font color="#ffffff">Description</font></th></tr><tr><td align="left" valign="center"><code>loaderClass</code></td><td align="left" valign="center">
|
||
|
<p>Java class name of the <code>java.lang.ClassLoader</code>
|
||
|
implementation class to use. If not specified, the default value is
|
||
|
<code>org.apache.catalina.loader.WebappClassLoader</code>.</p>
|
||
|
</td></tr></table>
|
||
|
|
||
|
</blockquote></td></tr></table>
|
||
|
|
||
|
|
||
|
</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Nested Components"><strong>Nested Components</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<p>No components may be nested inside a <strong>Loader</strong> element.</p>
|
||
|
|
||
|
</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Special Features"><strong>Special Features</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Logging"><strong>Logging</strong></a></font></td></tr><tr><td><blockquote>
|
||
|
|
||
|
<p>A loader is associated with the log category based on its classname.</p>
|
||
|
|
||
|
</blockquote></td></tr></table>
|
||
|
|
||
|
</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
|
||
|
Copyright © 1999-2006, Apache Software Foundation
|
||
|
</em></font></div></td></tr></table></body></html>
|