Sun Java System Web Server 7.0 Administrator's Configuration File Reference


The Output stage allows you to select filters that will process outgoing data. For more information, see Output.

Every Output directive has the following optional parameters:

Table 7–73 Output Directive's Optional Parameters

Optional Parameters 



(Optional) Specifies a wildcard pattern of MIME types for which this function will be executed. 


(Optional) Specifies a wildcard pattern of HTTP methods for which this function will be executed. Common HTTP methods are GET, HEAD, and POST.


(Optional) Specifies a wildcard pattern of query strings for which this function will be executed. 

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

In addition, the following common SAFs are valid for the Output directive:


The http-compression filter compresses outgoing content. If the client does not support compression, or the outgoing content is already compressed, http-compression performs no action.

Unlike the find-compressed SAF, the http-compression filter can compress dynamic content such as the output from SHTML pages, CGI programs, or JSPs. However, for reasons of efficiency, the find-compressed SAF is better for static content such as non-parsed HTML files. For more information, see find-compressed.


The following table describes parameter for the http-compression filter.

Table 7–74 http-compression Parameter




Controls whether the filter inserts a Vary: Accept-encoding header. If vary is absent, the default value is yes. yes tells the filter to insert a Vary: Accept-encoding header when it compresses content. no tells the filter to never insert a Vary: Accept-encoding header.


Size in bytes of the memory fragment used by the compression library to control how much to compress at a time. The default value is 8096. 


Controls the compression level used by the compression library. Valid values are from 1 to 9. A value of 1 results in the best speed. A value of 9 results in the best compression. The default value is 6. 


Controls an internal parameter of the compression library. Valid values are from 9 to 15. Higher values result in better compression at the expense of memory usage. The default value is 15. 


Controls how much memory is used by the compression library. Valid values are from 1 to 9. A value of 1 uses the minimum amount of memory but is slow. A value of 9 uses the maximum amount of memory for optimal speed. The default value is 8. 


Output fn="insert-filter"

In this example, type="text/*" restricts compression to documents that have a MIME type of text/* (for example, text/ascii, text/css, text/html, and so on).

Alternatively, you can specifically exclude browsers that do handle compressed content well by using the Client tag as follows:

<Client match="none"\
 browser="*MSIE [1-3]*"\
 browser="*MSIE [1-5]*Mac*"\
Output fn="insert-filter" filter="http-compression" type="text/*"

This example restricts compression to browsers that are not any of the following:

Internet Explorer on Windows earlier than version 4 may request compressed data at times, but does not correctly support it. Internet Explorer on Macintosh earlier than version 6 does the same. Netscape Communicator version 4.x requests compression, but only correctly handles compressed HTML. It does not correctly handle linked CSS or JavaScriptTM from the compressed HTML, so administrators often simply prevent their servers from sending any compressed content to that browser (or earlier).

For more information about the Client tag, see Client.


The sed-response filter applies sed edit commands to an outgoing response entity body, for example, an HTML file or output from a Servlet.


The following table describes parameter for the sed-response filter

Table 7–75 sed-response Parameter




Specifies a sed command script. When multiple sed parameters are provided, the sed edit commands are evaluated in the order they appear.


The following obj.conf code instructs sed-response to rewrite any occurrence of in an HTML response to

Output fn="insert-filter"

See Also