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

index-common

The index-common function generates a fancy (or common) list of files in the requested directory. The list is sorted alphabetically. Files beginning with a period (.) are not displayed. Each item appears as an HTML link. This function displays more information than index-simple, including the size, last modified date, and an icon for each file. It may also include a header and readme file in the listing.

The Init-class function cindex-init in magnus.conf specifies the format for the index list, including where to look for the images. If obj.conf contains a call to index-common in the Service stage, magnus.conf must initialize fancy (or common) indexing by invoking cindex-init during the Init stage.

Indexing occurs when the requested resource is a directory that does not contain an index file or a home page, or no index file or home page has been specified by the functions find-index or home-page.

The icons displayed are .gif files dependent on the Content-Type of the file, as listed in the following table:

Table 7–85 Content-Type Icons

Content-Type  

Icon 

"text/*"

text.gif

"image/*"

image.gif

"audio/*"

sound.gif

"video/*"

movie.gif

"application/octet-stream"

binary.gif

Directory 

menu.gif

All others 

unknown.gif

Parameters

The following table describes parameters for the index-common function.

Table 7–86 index-common Parameters

Parameter  

Description  

header

(Optional) Path (relative to the directory being indexed) and name of a file (HTML or plain text) that is included at the beginning of the directory listing to introduce the contents of the directory. The file is first tried with .html added to the end. If found, it is incorporated near the top of the directory list as HTML. If the file is not found, it is tried without the .html and incorporated as pre-formatted plain text (bracketed by <PRE> and </PRE>).

readme

(Optional) Path (relative to the directory being indexed) and name of a file (HTML or plain text) to append to the directory listing. This file might give more information about the contents of the directory, indicate copyrights, authors, or other information. The file is first tried with .html added to the end. If found, it is incorporated at the bottom of the directory list as HTML. If the file is not found, it is tried without the .html and incorporated as pre-formatted plain text (enclosed within the PRE tag).

type

(Optional) Common to all Service-class functions. Specifies a wildcard pattern of MIME types for which this function will be executed. For more information, see Service.

method

(Optional) Common to all Service-class functions. Specifies a wildcard pattern of HTTP methods for which this function will be executed. For more information, see Service.

query

(Optional) Common to all Service-class functions. Specifies a wildcard pattern of query strings for which this function will be executed. For more information, see Service.

UseOutputStreamSize

(Optional) Common to all Service-class functions. Determines the default output stream buffer size (in bytes), for data sent to the client. For more information, see Service.

flushTimer

(Optional) Common to all Service-class functions. Determines the maximum number of milliseconds between write operations in which buffering is enabled. For more information, see Service.

ChunkedRequestBufferSize

(Optional) Common to all Service-class functions. Determines the default buffer size, in bytes, for un-chunking request data. For more information, see Service.

ChunkedRequestTimeout

(Optional) Common to all Service-class functions. Determines the default timeout, in seconds, for un-chunking request data. For more information, see Service.

bucket

(Optional) Common to all obj.conf functions. Adds a bucket to monitor performance. For more information, see The bucket Parameter.

Example

Service type="magnus-internal/directory" method="(GET|HEAD)" 
fn="index-common" header="hdr" readme="rdme.txt"

See Also