70 lines
7.5 KiB
HTML
70 lines
7.5 KiB
HTML
|
<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference - The Resources Component</title><meta name="author" value="Remy Maucherat"><meta name="email" value="remm@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><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="true"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Config Ref. Home</a></li></ul><p><strong>Top Level Elements</strong></p><ul><li><a href="server.html">Server</a></li><li><a href="service.html">Service</a></li></ul><p><strong>Executors</strong></p><ul><li><a href="executor.html">Executor</a></li></ul><p><strong>Connectors</strong></p><ul><li><a href="http.html">HTTP</a></li><li><a href="ajp.html">AJP</a></li></ul><p><strong>Containers</strong></p><ul><li><a href="context.html">Context</a></li><li><a href="engine.html">Engine</a></li><li><a href="host.html">Host</a></li><li><a href="cluster.html">Cluster</a></li></ul><p><strong>Nested Components</strong></p><ul><li><a href="globalresources.html">Global Resources</a></li><li><a href="loader.html">Loader</a></li><li><a href="manager.html">Manager</a></li><li><a href="realm.html">Realm</a></li><li><a href="resources.html">Resources</a></li><li><a href="valve.html">Valve</a></li></ul><p><strong>Cluster Elements</strong></p><ul><li><a href="cluster.html">Cluster</a></li><li><a href="cluster-manager.html">Manager</a></li><li><a href="cluster-channel.html">Channel</a></li><li><a href="cluster-membership.html">Channel/Membership</a></li><li><a href="cluster-sender.html">Channel/Sender</a></li><li><a href="cluster-receiver.html">Channel/Receiver</a></li><li><a href="cluster-interceptor.html">Channel/Interceptor</a></li><li><a href="cluster-valve.html">Valve</a></li><li><a href="cluster-deployer.html">Deployer</a></li><li><a href="cluster-listener.html">ClusterListener</a></li></ul></td><!--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 Resources Component</h2></td><td align="right" valign="top" nowrap="true"><small><a href="printer/resources.html"><img src="../images/printer.gif" border="0" alt="Printer Friendly Version"><br>print-friendly<br>version
|
||
|
</a></small></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>Resources</strong> element represents the <em>web
|
||
|
application static resources</em>, from which classes will be loaded,
|
||
|
HTML, JSP and the other static files will be served. This allows the webapp
|
||
|
to reside on various mediums other than the filesystem, like compressed
|
||
|
in a WAR file, in a JDBC database, or in a more advanced versioning
|
||
|
repository.</p>
|
||
|
|
||
|
<p>A unified caching engine is provided for all accesses to the webapp
|
||
|
resources made by the servlet container and web applications which use the
|
||
|
container provided mechanisms to access such resources, such as class laoder
|
||
|
access, access through the <code>ServletContext</code> interface, or native
|
||
|
access through the <code>DirectoryContext</code> interface.</p>
|
||
|
|
||
|
<p><strong>Note: Running a webapp with non-filesystem based
|
||
|
Resources implementations is only possible when the webapp does not
|
||
|
rely on direct filesystem access to its own resources, and uses the methods
|
||
|
in the ServletContext interface to access them.</strong></p>
|
||
|
|
||
|
<p>A Resources element MAY be nested inside a
|
||
|
<a href="context.html">Context</a> component. If it is not included,
|
||
|
a default filesystem based Resources will be created automatically,
|
||
|
which is sufficient for most requirements.</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="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>Resources</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>javax.naming.directory.DirContext</code> interface.
|
||
|
It is recommended for optimal functionality and performance,
|
||
|
but not mandatory, that the class extend
|
||
|
<code>org.apache.naming.resources.BaseDirContext</code>, as well as
|
||
|
use the special object types provided in the
|
||
|
<code>org.apache.naming.resources</code> for returned objects.
|
||
|
If not specified, the standard value (defined below) will be used.</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>Resources</strong> is
|
||
|
<strong>org.apache.naming.resources.FileDirContext</strong>, and
|
||
|
is configured by its parent Context element.</p>
|
||
|
|
||
|
</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>Resources</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>
|
||
|
|
||
|
<p>No special features are associated with a <strong>Resources</strong>
|
||
|
element.</p>
|
||
|
|
||
|
</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>
|