| java.lang.Object sunlabs.brazil.handler.DefaultFileHandler
DefaultFileHandler | public class DefaultFileHandler implements Handler(Code) | | Handler for appending a url ending with '/' into the appropriate
url based on a default file in the file system.
The following request properties are used:
- defaults
- The names of the default files to search for in
the directory implied by the URL.
The first one that exists will
cause its name to be appended to the URL. Defaults
to "index.html".
- root
- The document root to look for files. If none is found with our
prefix, then "root" is examined. Defaults to ".".
- DirectoryName
- This property is set if the URL represents a valid
directory in the document root.
- fileName
- This property is set to the name of the default file,
if one was found.
author: Stephen Uhler version: %V% 00/12/11 |
Method Summary | |
public boolean | init(Server server, String prefix) Remember our profix in the properties table. | public boolean | respond(Request request) If the url ends with a "/" look around in the corrosponding directory
to find a suitable default file, and then change the url. |
init | public boolean init(Server server, String prefix)(Code) | | Remember our profix in the properties table.
|
respond | public boolean respond(Request request) throws IOException(Code) | | If the url ends with a "/" look around in the corrosponding directory
to find a suitable default file, and then change the url.
|
|
|