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:
-
flowcontains the XML configuration files for the controller -
xmlcontains the XML files with static localized strings -
xslcontains 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
-
METHODis either http or https -
HOSTNAMEis the host name the web application is running on -
CGIis eithercgifor standard CGI orfcgifor Fast-CGI -
PROGRAMselects the controller script to execute
Global session variables
Global session variables are available to all PROGRAMs.
-
cgibasethe URL up to but not includingPROGRAM -
httpbasethe URL up to but not including CGI -
httpsbasethe secure URL up to but not including CGI -
imgbasethe URL to the images -
languagethe session language -
scgibasethe secure URL up to but not includingPROGRAM -
sslflag that tells if this session runs over secured HTTP or not (true | false), i.e. ifMETHODis 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.
-
programthe program name -
path_extrathe part of the URL betweenPROGRAMand?, 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_LANGUAGEScomma-separated list of allowed languages -
KEEP_SSLflag (true|false) : once switched to https stay on https -
DISABLE_SSLflag (true|false) : disable https, always stay on http -
IMAGE_BASEimage base url -
SESSION_TIMEOUTtimeout of a web session in seconds -
USER_LIBRARIEScolon-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.
