sunlabs.brazil.handler
Class DirectoryHandler
public
class
DirectoryHandler
extends Object
implements Handler
This is a bare-bones handler for providing directory listings
for web servers.
It is designed to be placed after the
FileHandler. If no index file is found,
Then a simple directory listing will be produced. Only files whose
extensions are in the mime properties will be listed.
NOTE: This handler is obsolete, as it provides no control over the
format of the directory listing,
Use the DirectoryTemplate instead.
Configuration properties used:
- prefix, suffix, glob, match
- Specify the URL that triggers this handler.
(See MatchString).
- DirectoryName
- This property is set by the
FileHandler if the
URL it was passed resolves to a directory, but no
index file (e.g. index.html) was found.
- setProps
- If present, no content is returned. Instead,
The properties "Directories" and "Files" are
set in the request properties, so the format of
the output may be generated dynamically.
[Note: This feature is deprecated, use the
DirectoryTemplate
instead].
- delim
- The delimeter separating the file names.
Defaults to a single space.
- mime.xxx
- Only documents ending in ".xxx" are considered.
more than on mime.xxx parameters may be specified.
Version: 2.3, 06/11/13
Author: Stephen Uhler
Method Summary |
boolean | init(Server server, String prefix)
Get the url prefix for this handler. |
boolean | respond(Request request)
Display files in a directory, after being rejected by the
FileHandler. |
public boolean init(
Server server, String prefix)
Get the url prefix for this handler.
public boolean respond(
Request request)
Display files in a directory, after being rejected by the
FileHandler. The output is very simple.