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

index-common

Applicable in Service-class directives.

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, date last modified, and an icon for each file. It may also include a header and/or readme file into 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 4–48 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 4–49 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 preformatted plain text (bracketed by <PRE> and).

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 preformatted plain text (enclosed by <PRE> and </PRE>).

type

(Optional) Common to all Service-class functions.

method

(Optional) Common to all Service-class functions.

query

(Optional) Common to all Service-class functions.

UseOutputStreamSize

(Optional) Common to all Service-class functions.

flushTimer

(Optional) Common to all Service-class functions.

ChunkedRequestBufferSize

(Optional) Common to all Service-class functions.

ChunkedRequestTimeout

(Optional) Common to all Service-class functions.

bucket

(Optional) Common to all obj.conf functions.

Example

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

See Also

index-simple, find-index, home-page