| Handler for manipulating per-user session state that can be
represented as ASCII name/value pairs. The state for each session
is stored in a file, which is expected to be in java properties format.
If "prefix" is matched, the contents of the (usually cached) config file
for the current session is added to the request properties.
If the url matches the "set" property, the contents of the config
file are changed based on the supplied query parameters (either GET
of POST). If no config file exists for the session, one is created
from a default properties file. Only properties already in the
config file may be changed using the "set" method.
If a "%" is specified in the file name, it is replaced by the
SessionID property, if any, or "common" if sessions aren't used.
This should be replaced with something more general, so we can have
more arbitrary mappings between request and the session info.
The following request properties are used:
- prefix
- The URL prefix required for all documents
- set
- The url pattern to match setting properties.
Currently, it must also match "prefix".
- noContent
- a url, matching the "set" pattern that causes
a "204 no content" to be returned to the client
(experimental).
- name
- The name of the config file. the first "%" is replaced
by the current SessionID.
- default
- The default properties file to "seed" session properties
- glob
- Properties that match this "glob" pattern may be set
using the "set" pattern. If this property is specified,
the "default" property is optional.
- root
- The document root (no properties prefix required). If the
"name" or "default" properties don't start with a "/",
this is used as the current directory.
If "%" is specified in the file name, a new session file is
created only if 1) a property is changed from the default, and 2)
A cookie was received by the browser.
See also:
sunlabs.brazil.template.SetTemplate and
sunlabs.brazil.session.PropertiesCacheManager which may
be used (together) to provide a templated based (instead of URL based)
mechanism for maintaining persistent properties.
Note1: This version uses ReChainableProperties.
author: Stephen Uhler version: 1.31, 00/12/11 |