ServletContextListener
that automatically scans chain configuration files in the current web application at startup time, and exposes the result in a {@link Catalog} under aspecified servlet context attribute. The following context init parameters are utilized:
ClassLoader.getResource()
calls. If not specified, no class loader resources will be loaded.<catalog>
elements (which will cause registration of the created {@link Catalog}s into the {@link CatalogFactory} for this application, and noservet context attribute will be created. NOTE - This parameter is deprecated. RuleSet
implementation to use for parsing configuration resources (this class must have a public zero-args constructor). If not defined, the standard RuleSet
implementation will be used.When a web application that has configured this listener is started, it will acquire the {@link Catalog} under the specified servletcontext attribute key, creating a new one if there is none already there. This {@link Catalog} will then be populated by scanning configurationresources from the following sources (loaded in this order):
META-INF/chain-config.xml
resource found in a JAR file in /WEB-INF/lib
.ClassLoader.getResource()
).ServetContext.getResource()
).If no attribute key is specified, on the other hand, parsed configuration resources are expected to contain <catalog>
elements, and the catalogs will be registered with the {@link CatalogFactory}for this web application.
This class requires Servlet 2.3 or later. If you are running on Servlet 2.2 system, consider using {@link ChainServlet} instead.Note that {@link ChainServlet} uses parameters of thesame names, but they are servlet init parameters instead of context init parameters. Because of this, you can use both facilities in the same application, if desired.
@author Craig R. McClanahan @author Ted Husted @version $Revision: 1.7 $ $Date: 2004/11/30 05:52:23 $
|
|