|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
Resources
implementations for the
various supported repositories for static resource files.
See:
Description
Class Summary | |
Constants | |
DirectoryBean | Abstraction bean that represents the properties of a "resource" that is actually a "directory", in a fashion that independent of the actual underlying medium used to represent those entries. |
FileResources | Implementation of the Resources that operates off a document base that is a directory in the local filesystem. |
JarResources | Implementation of the Resources that decompresses and renders entries from a JAR file that is located either locally or remotely. |
ResourceBean | Abstraction bean that represents the properties of a "resource" that may or may not be a "directory", in a fashion that is independent of the actual underlying medium used to represent those entries. |
ResourcesBase | Convenience base class for implementations of the Resources interface. |
This package contains Resources
implementations for the
various supported repositories for static resource files. They may be used
(by a Context
implementation) in implementing the following
API calls:
The implementations share a common base class that supports caching of
resources where appropriate. Caching (and other features) of all the
standard Resources
implementations are configured by setting
the following properties (default values are in square brackets):
Resources
implementation, which must follow the syntax specified for each
individual implementation. This property is transparently duplicated
from the docBase
property of the Context
we are associated with. [REQUIRED - NO DEFAULT]
The standard Resources
implementations that are currently
available include the following (with additional configuration properties
as specified):
Resources
that
operates off a document base that is a directory in the server's
local filesystem. The document base must specify a relative or absolute
pathname. If it is relative, it is resolved against the application
base for our surrounding Host
(if any), or against the
value of the "catalina.home" system property. Files can be added, removed,
or modified within this directory while the application runs -- a
background thread periodically checks the last modified time of all
cached resources and un-caches entries that have been modified, so that
the updated version will be processed the next time it is requested.Resources
that
operates off a web application archive (WAR) file directly. In this
environment, there is no concept of "file paths" to the various entries,
so getRealPath()
will always return null
. In
addition, this implementation assumes that the individual entries in the
WAR file, or the WAR file itself, will not be modified while the
application is running -- therefore, no checking for out-of-date cache
entries is required. Caching is still performed, subject to the policies
enforced by the cacheable()
method, because the JAR file
itself might be on a remote server.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |