Support of traditional SSI commands

The aim is to provide functionality similar to what the Apache mod_include module has. You need this feature if you want to use both traditional SSI and the <SERVLET> tag within the same page.

In order to make the commands work, you've to add the SSISiteRoot init argument. See the installation instructions.

Experimental. Currently, only a subset of the Apache SSI directives is implemented, and their functionality is restricted as well. Follow closely the development of Apache JSSI if you need more than this.

You might want to check out the mod_include documentation (link to the web). This document implicitly refers to it when missing features are discussed.

Commands

A traditional SSI command has the syntax:
<!--#element attribute=value attribute=value ... -->
The value will often be enclosed in double quotes; many commands only allow a single attribute-value pair. Note that the comment terminator (-->) should be preceded by whitespace to ensure that it isn't considered part of an SSI token.

The allowed elements are:

config
This command controls various aspects of the parsing. The valid attributes are:
sizefmt
The value sets the format to be used which displaying the size of a file. Valid values are bytes for a count in bytes, or abbrev for a count in Kb or Mb as appropriate.
timefmt
The value is a string to be used by the strftime(3) library routine when printing dates.
errmsg is not implemented.
echo
This command prints one of the include variables, defined below. If the variable is unset, it is printed as (none). Any dates printed are subject to the currently configured timefmt. Attributes:
var
The value is the name of the variable to print.
fsize
This command prints the size of the specified file, subject to the sizefmt format specification. Attributes:
file
The value is a path relative to the directory containing the current document being parsed.
virtual
The value is a (%-encoded) URL-path relative to the current document being parsed. If it does not begin with a slash (/) then it is taken to be relative to the current document.
The virtual attribute does not know about aliases, URL rewriting and the like. Therefore, the result might be surprising to you. This restriction applies to all directives which work on files.
flastmod
This command prints the last modification date of the specified file, subject to the timefmt format specification. The attributes are the same as for the fsize command.
include
This command inserts the text of another document or file into the parsed file. Included files are not subject to the usual access control (unlike with Apache mod_include). The Apache IncludesNOEXEC feature is not implemented. It is not needed, as the exec and cgi SSI commands are missing either. An attribute defines the location of the document; the inclusion is done for each attribute given to the include command. The valid attributes are:
file
The value is a path relative to the directory containing the current document being parsed. It cannot contain ../, nor can it be an absolute path. The virtual attribute should always be used in preference to this one.
virtual
The value is a (%-encoded) URL relative to the current document being parsed. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash (/) then it is taken to be relative to the current document.
A URL is constructed from the attribute, and the output the server would return if the URL were accessed by the client is included in the parsed output. Thus included files can be nested.

Include Variables

The only variables currently available are
DATE_GMT
The current date in Greenwich Mean Time.
DOCUMENT_NAME
The filename (excluding directories) of the document requested by the user.
LAST_MODIFIED
The last modification date of the document requested by the user.

No variable substitution is performed.

Other restrictions

The XBitHack Apache directive has no effect. (Which is not bad.)

Copyright (c) 1997-99 The Java Apache Project.
All rights reserved.