Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.w3c.jigsaw.ssi.commands
Class DefaultCommandRegistry

    java.lang.Object
      |
      +--org.w3c.jigsaw.ssi.commands.CommandRegistry
            |
            +--org.w3c.jigsaw.ssi.commands.BasicCommandRegistry
                  |
                  +--org.w3c.jigsaw.ssi.commands.DefaultCommandRegistry

public class DefaultCommandRegistry
extends BasicCommandRegistry

This class provides the most general and commonly used SSI commands. Compatibility with the NCSA-style directive set has been maintained as much as it made sense to, and new functionality adequate to Jigsaw has been added.

In the description that follows, please refer to the NCSA server-side includes tutorial for comparison.

The full set of commands of the DefaultCommandRegistry is:

`config`
  The `errmsg` tag is not implemented.
`include`
  The `file` and `virtual` tags are handled in the same way. Both originate an internal request to the URL given as the value of the tag. There is no provision for including a file that is not indexed by Jigsaw. This command can be used to include the content of any resource. This includes the SSIFrame.

  In addition, the following tags are admissible:

  `ifheader`
    Its value is interpreted as a header name. It causes the resource to be included only if that header was defined in the original (client) request.
  `else`
    Used in conjunction with `ifheader`, it specifies a URL to be included in case the header is not defined.
`echo`
  In addition to the `var` tag, which has the NCSA behavior, the following tags are admissible:
  `reqstate`
    Its value is interpreted as a Jigsaw request state, and is expanded as the value of the state. For instance, the command
    `<!--#echo reqstate="org.w3c.jigsaw.filters.CounterFilter.count"-->`
    will print the current hit-count, assuming a CounterFilter exists for the resource.
  `reqheader`
    Its value is interpreted as a header in the request, and is expanded as the value of the header.
  `here` If this tag is present, command is expanded as interpreted relative to the innermost internal request. By default, it is interpreted relative to the original (client) request.
`fsize`
  Behaves like its NCSA counterpart, except that it also recognizes the tag `here`. If present, this tag indicates to include the file size of the innermost included file. Normally, it includes the file size of the topmost SSI-parsed file requested by the client. It honors the `sizefmt` variable, as set by `config`.
`flastmod`
  In addition to NCSA behavior, it honors the `here` tag, which indicates to include the time stamp of the innermost included file.
`exec`
  It accepts only the `cmd` tag. Given that the `include` command can include CgiResources, the `cgi` tag is superfluous.

  If the SSIFrame `secure` attribute is set, this command will be inoperative.

`params`
  This command expands to an HTML unordered list of the parameters that it was called with. Provided mainly for instructional purposes.
`count`
  Expands to the access count reported by the CounterFilter. (This may or may not mean the access count of the document, depending on the way the CounterFilter is set up)

See Also:
  Serialized Form

Constructor Summary
`DefaultCommandRegistry()`

Method Summary
`java.util.Dictionary` | `initVariables(SSIFrame ssiframe, Request request, java.util.Dictionary variables)` Initialize execution variables.

Methods inherited from class org.w3c.jigsaw.ssi.commands.BasicCommandRegistry
`getDebugWrapperCommand, lookupCommand, registerCommand`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultCommandRegistry

    public DefaultCommandRegistry()

Method Detail

### initVariables

    public java.util.Dictionary initVariables(SSIFrame ssiframe,
                                              Request request,
                                              java.util.Dictionary variables)

  Description copied from class: CommandRegistry
  Initialize execution variables. Called before any of the SSI commands in the documents are executed. This method augments or modifies the dictionary given as argument. If the variable dictionary is null, it may create a new one and return it. SSIFrame will always call this method with variables set to null. Its existence is mainly to facilitate the subclassing of an existing registry.
  Overrides:
    initVariables in class BasicCommandRegistry
  Tags copied from class: CommandRegistry
  Parameters:
    `request` - the HTTP request
    `variables` - other variables previously defined
  Returns:
    the modified/augmented set of variables

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD