| java.lang.Object sunlabs.brazil.handler.HomeDirHandler
HomeDirHandler | public class HomeDirHandler implements Handler(Code) | | Handler for converting ~username queries.
When invoked upstream of the
FileHandler This provides Unix user's with individual home pages.
Properties:
- subdir
- Name of the directory in the user's home directory
that represents the user's "doc root"
- home
- The mount-point for homre directories,
defaults to "/home/".
Url's of the form:
/~[user]/stuff...
are transformed into
[home][user]/[subdir]/stuff....
Note: This functionallity has been mostly subsumed by the
UrlMapperHandler .
author: Stephen Uhler version: 1.9, 00/12/11 |
Field Summary | |
final static String | DIR Handler configuration property subdir. | final static String | HOME Handler configuration property home. |
Method Summary | |
public boolean | init(Server server, String prefix) Get and set the configuration parameters. | public boolean | respond(Request request) If this is a ~user request, modify the root and
url properties of the request object. |
DIR | final static String DIR(Code) | | Handler configuration property subdir.
The name of the directory in the user's home directory to use as the
document root for this request.
The default is public_html .
|
HOME | final static String HOME(Code) | | Handler configuration property home.
The directory that user accounts live in.
The current implementation doesn't consult the password file, but
uses a static mapping from the userid to a directory.
The default is /home.
using the default settings, a url of the form:
/~user/foo.html gets translated into the file:
/home/user/public_html/foo.html .
|
init | public boolean init(Server server, String prefix)(Code) | | Get and set the configuration parameters.
|
respond | public boolean respond(Request request) throws IOException(Code) | | If this is a ~user request, modify the root and
url properties of the request object.
|
|
|