| java.lang.Object sunlabs.brazil.handler.DirectoryHandler
DirectoryHandler | public class DirectoryHandler implements Handler(Code) | | Handler for directory lists.
This is a bare-bones handler for providing directory listings
for web servers.
It is designed to be placed after the
sunlabs.brazil.server.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
sunlabs.brazil.template.DirectoryTemplate instead.
Configuration properties used:
- prefix
- An initial prefix for urls that may provide listings
- DirectoryName
- This property is set by the
sunlabs.brazil.server.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
sunlabs.brazil.template.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.
author: Stephen Uhler version: 1.13, 00/12/11 |
Method Summary | |
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. |
init | public boolean init(Server server, String prefix)(Code) | | Get the url prefix for this handler.
|
respond | public boolean respond(Request request) throws IOException(Code) | | Display files in a directory, after being rejected by the
FileHandler. The output is very simple.
|
|
|