Sun Java System Web Server 6.1 SP6 Administrator's Configuration File Reference

Output

All Output directives are executed when the server or a plug-in first attempts to write entity body data from the client.

The Output stage allows you to select filters that will process outgoing data.

You can add NSAPI filters that process outcoming data by invoking the insert-filter SAF in the Output stage of the request-handling process. The Output directives are executed at most once per request.

You can define the position of a filter within the filter stack. For example, filters that translate content from XML to HTML are placed higher in the filter stack than filters that compress data for transmission. You can use the filter_create function to define the filter's position in the filter stack and the init-filter-order to override the defined position.

When two or more filters are defined to occupy the same position in the filter stack, filters that were inserted later will appear higher than filters that were inserted earlier.

The following Output-class functions are described in detail in this section:

insert-filter

Applicable in Output-class directives.

The insert-filter SAF is used to add a filter to the filter stack to process outgoing (server-to-client) data.

The order of Input fn="insert-filter" and Output fn="insert-filter" directives can be important.

Returns

Returns REQ_PROCEED if the specified filter was inserted successfully, or REQ_NOACTION if the specified filter was not inserted because it was not required. Any other return value indicates an error.

Parameters

The following table describes parameters for the insert-filter function.

Table 4–41 insert-filter Parameters

Parameter  

Description  

filter

Specifies the name of the filter to insert. 

bucket

(Optional) Common to all obj.conf functions.

Example


Output fn="insert-filter" filter="http-compression"

         

match-browser

Applicable in all stage directives. The match-browser SAF matches specific strings in the User-Agent string supplied by the browser, and then modifies the behavior of Sun Java System Web Server based upon the results by setting values for specified variables. See match-browser.

remove-filter

Applicable in Input-, Output-, Service-, and Error-class directives.

The remove-filter SAF is used to remove a filter from the filter stack. If the filter has been inserted multiple times, only the topmost instance is removed. In general, it is not necessary to remove filters with remove-filter, as they will be removed automatically at the end of the request.

Returns

Returns REQ_PROCEED if the specified filter was removed successfully or REQ_NOACTION if the specified filter was not part of the filter stack. Any other return value indicates an error.

Parameters

The following table describes parameters for the remove-filter function.

Table 4–42 remove-filter Parameters

Parameter  

Description  

filter

Specifies the name of the filter to remove. 

bucket

(Optional) Common to all obj.conf functions.

Example


Output fn="remove-filter" filter="http-compression"

         

set-variable

Applicable in all stage directives. The set-variable SAF enables you to change server settings based upon conditional information in a request and to manipulate variables in parameter blocks by using specific commands. See set-variable.