| career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (resources.xml)

This example Tomcat source code file (resources.xml) is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

apache, asf, asf, attributes, context, if, license, license, resources, resources, see, this, you, you

The Tomcat resources.xml source code

<?xml version="1.0"?>
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  See the License for the specific language governing permissions and
  limitations under the License.
<!DOCTYPE document [
  <!ENTITY project SYSTEM "project.xml">
<document url="resources.html">


    <author email="">Remy Maucherat
    <title>The Resources Component


<section name="Introduction">

  <p>The Resources element represents the 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

  <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 interface, or native
  access through the <code>DirectoryContext interface.

<p>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>A Resources element MAY be nested inside a <a href="context.html">Context component. If it is not included, a default filesystem based Resources will be created automatically, which is sufficient for most requirements.</p> </section> <section name="Attributes"> <subsection name="Common Attributes"> <p>All implementations of Resources support the following attributes:</p> <attributes> <attribute name="className" required="false"> <p>Java class name of the implementation to use. This class must implement the <code> interface. It is recommended for optimal functionality and performance, but not mandatory, that the class extend <code>org.apache.naming.resources.BaseDirContext, as well as use the special object types provided in the <code>org.apache.naming.resources for returned objects. If not specified, the standard value (defined below) will be used.</p> </attribute> </attributes> </subsection> <subsection name="Standard Implementation"> <p>The standard implementation of Resources is <strong>org.apache.naming.resources.FileDirContext
, and is configured by its parent Context element.</p> </subsection> </section> <section name="Nested Components"> <p>No components may be nested inside a Resources element.

</section> <section name="Special Features"> <p>No special features are associated with a Resources element.</p> </section> </body> </document>

Other Tomcat examples (source code examples)

Here is a short list of links related to this Tomcat resources.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.