[snippet-filter:<uri>] stanza
Use the [snippet-filter:<uri>] stanza to configure the snippet filter for a particular resource.
[snippet-filter:<uri>] <location> = <filename>Description
This filter allows snippets to be inserted into the response for the specified URI. The filter examines each individual line of the response, and if the entire line matches, the filter inserts the snippet prior to the matching line.
Options
<uri> The URI for which the snippet substitution takes place. <location> The location at which the snippet is inserted. The location is pattern matched against a single line in the response. The snippet is then inserted immediately before the matching line. The value must represent the entire line the snippet is to be inserted before. We can use the *and?wildcard characters in the location pattern. The pattern match for this parameter is case-sensitive.<filename> The name of the file which contains the snippet to be inserted. We can specify a path that is relative to the snippet directory in the management root directory. This parameter is case-sensitive.
Usage:
We can specify multiple resources and configure multiple locations for each resource. The entries in the stanza must appear in the order in which they will be inserted in the returned page. Only the first match for each configuration entry is updated with the snippet. After a match has been found, WebSEAL progresses to the next configuration entry. If a match is not found for a particular configuration entry, the subsequent entries in the stanza are not processed.
We must include a new line character at the end of the snippet file contents if we want the snippet to be inserted as a separate line. Otherwise, WebSEAL adds the snippet to the start of the matching line.
When we configure a snippet-filter stanza for a resource that is accessed over a virtual junction or a local junction, the <uri> value is a forward slash followed by the resource name. For example, [snippet-filter:/myResource.html].
As a result, a particular [snippet-filter:<uri>] stanza can represent multiple resources. In the preceding example, WebSEAL inserts snippets into the responses when accessing myResource.html over a local junction or virtual junction.
If the configured <filename> value is a non-existent file, WebSEAL fails to restart with a
DPWIV0752E Could not open fileerror.Default: None.
Example:
[snippet-filter:/stdjunction/sampleResource.html] *test* = samplesnippet.html ?hello* = samplesnippet2.html
- [snippet-filter:<uri>:partial-line-match]
Use the [snippet-filter:<uri>:partial-line-match] stanza to configure the snippet filter for a particular resource.Parent topic: Stanza reference