|
This serves up files from the class path. Usually this is used to serve files from within a jar file that is
within the classpath of the application running. However, you could serve up files from anywhere in the classpath,
no just jar files. This makes it easy to package part of your web content inside a jar file for easy distribution,
but make it transparently available without the user needing to extract the content from the jar file. This is
great for static or default content that you don't want users to have to manage. By putting a FileHandler and a
ResourceHandler in a chain filtering on the same url-prefix, you can allow users to override or augment content
from the jar file by placing the same file on the file system, but load the default from the jar file if the file
not on the file system.
url-prefix | The prefix to filter request urls. | None | Yes |
resourceMount | A path within the classpath to the root of the folder to share.
The requested url minus the url-prefix will be added to this path to yield the path loaded from the classpath.
| None | Yes |
default | The name of the default resource that should be used if no file is specified in the URL. ( like index.html ) | index.html | No |
|