View
The view is a set of XSLT files, that take results from business logic calls as well as static XML files as input and create the resulting HTML pages. XSLT can be extended with user-defined XPath functions.
Directory structure
All web related files are stored under /opt/DOMAIN/web
.
Under this directory there are three subdirectories:
-
flow
contains the XML configuration files for the controller -
xml
contains the XML files with static localized strings -
xsl
contains the XSLT files
Transformation
XSLT file is processed taking XML as input to generate HTML pages. The structure of the XML is
<data> <global> Global session variables </global> <local> Local session variables </local> <output> Result of the last SOAP call to application logic </output> <ANY> Contents of the XML file with static localized strings </ANY> </data>
XML files
The document element of static XML files can have any name, except for the reserved names global
, local
and
output
. It will appear with the given name under data
. XML files can include other XML files by means
of DTD ENTITY tags. Example:
<xml version="1.0" encoding="utf-8"?> <!DOCTYPE static [ <!ENTITY top SYSTEM "top.xml"> ]> <static> <htmltitle>example.com - About</htmltitle> <title>About this forum</title> ⊤ </static>
URL structure
The URL is composed like this:
METHOD://HOSTNAME/CGI/PROGRAM
-
METHOD
is either http or https -
HOSTNAME
is the host name the web application is running on -
CGI
is eithercgi
for standard CGI orfcgi
for Fast-CGI -
PROGRAM
selects the controller script to execute
Global session variables
Global session variables are available to all PROGRAM
s.
-
cgibase
the URL up to but not includingPROGRAM
-
httpbase
the URL up to but not including CGI -
httpsbase
the secure URL up to but not including CGI -
imgbase
the URL to the images -
language
the session language -
scgibase
the secure URL up to but not includingPROGRAM
-
ssl
flag that tells if this session runs over secured HTTP or not (true | false), i.e. ifMETHOD
is http or https -
userid
(must be set by login) user id of authenticated user -
username
(must be set by login) user name of authenticated user
Also included are the following virtual variables (they do not exist in the session, instead they are set for every request.
-
program
the program name -
path_extra
the part of the URL betweenPROGRAM
and?
, the start of the arguments
Local session variables
Local session variables are PROGRAM
-specific and are all form fields posted or submitted in a call to the PROGRAM
.
Local session variables live until they are explicitly cleared by means of a call to the session daemon. This allows for easy creation
of forms that remember input values, and for processes that gather user input over multiple pages.
CGI
cgi and fcgi read the configuration file /opt/DOMAIN/etc/cgi.env
or fcgi.env
respectively, containing
the following variables:
-
ALLOWED_LANGUAGES
comma-separated list of allowed languages -
KEEP_SSL
flag (true|false) : once switched to https stay on https -
DISABLE_SSL
flag (true|false) : disable https, always stay on http -
IMAGE_BASE
image base url -
SESSION_TIMEOUT
timeout of a web session in seconds -
USER_LIBRARIES
colon-separated list of libraries containing user-defined xpath functions
sessiond
sessiond manages user's web sessions.
Daemon Configuration
sessiond uses the configuration file /opt/DOMAIN/etc/sessiond.env
.