This documentation is a very early draft and should be read together with the README.TXT file in the top Jetty directory.

Jetty Configuration File

Syntax

Boolean values are indicated by "True" or "False", "Yes", "No", "Y", "N", "1", "0", or similar. They are not case-sensitive.

Lists are separated with semicolons (or commas?).

PathMaps are semicolon-separated lists of patterns, see below for details.

A pathmap pattern either is a wildcard-style suffix rule such as *.jsp, with the wildcard '*' as the first character. This matches anything ending with exactly .jsp. The wildcard syntax does not combine with any of the other pattern characters.

If the pattern does not begin with '*', it may end with one of the following pattern characters. All of these patterns must exactly match the beginning of the path, up to the last character of the pattern. If the pattern contains no special characters, it must match a prefix of the path.

Config File Properties

Define the server instances to be configured by this file:

SERVERS : List of defined server names
PROPERTY.* : Global properties listed inline
PROPERTIES : Name of file of global properties
servername.* : PropertyTree describing server "servername".

Defined global properties are:

DefaultPageType : The class name of the default com.mortbay.HTML.Page type, e.g. com.mortbay.Jetty.JettyLaF.

Server

Defined server properties are:

CLASS : The class name of the server; subclass of com.mortbay.HTTP.HttpServer
LISTENER.name.CLASS : Class name of listener, must be subclass of HttpListener
LISTENER.name.ADDRS : List of addresses and ports to listen on
STACKS : List of request handler stack names.
EXCEPTIONS : List of exception handler stack names.
PROPERTIES : Name of file of properties for this server.
PROPERTY.* : Properties for this listener, listed inline

The property names for listeners are:

SessionMaxInactiveInterval : Max idle time Ms before session death
MinListenerThreads : Min listener threads per listener
MaxListenerThreads : Max listener threads per listener
MaxListenerThreadIdleMs : Max idle time Ms before listen thread death
HTTP1_0_KeepAlive : Boolean for using Keep-Alive with HTTP/1.0
MimeMap : Name of property file of MIME mappings

Stacks

Stack properties are:

PATHS : List of PathMap path specifiactions for this stack
HANDLERS : List of handler names for this stack.
name.CLASS : The classname for the handler "name"
name.PROPERTY.* : Properties defined for handler "name"
name.PROPERTIES : file of properties defined for handler "name"

Handlers

This section lists the Handler classes and the configuration properties available for each. All the handler classes listed are in package com.mortbay.HTTP.Handler.

BasicAuthHandler

name.LABEL : The realm label
name.PATHS : /pathMap/entry;/list
name.PROPERTIES : fileNameOfLoginPasswordMapping
name.PROPERTY.login : password

DefaultExceptionHandler

No properties for this handler.

FileHandler

Indexes : index.html,index.htm
AllowPut : False
AllowDelete : False
AllowDir : True
MaxCachedFiles : 100
MaxCachedFileSize : 8192
FILES.name.PATHS : /pathSpec;/list%
FILES.name.DIRECTORY : /Directory

FilterHandler

name.CLASS : filterClassName
name.PATHS : /list/of/paths

ForwardHandler

ProxyAddrPort : 0.0.0.0:1234
FORWARD.name.PATHS : /pathSpec;/list%
FORWARD.name.URL : http:/forward/url

LogHandler

File : The filename of the log. "err" and "out" are special file names that log to System.err and System.out.
Append:(False) If true append to the log file.
LongForm : (False) If true the log is the long format
DateFormat : Simple date format. If not present, use the format in the request.
CountContentLength : (False) If true count the bytes of replies even if they do not have a content length header (expensive).

ParamHandler

CookiesAsParameters : boolean, if true include cookies as request params

ProxyHandler

No properties for this handler.

ServletHandler

PATHS : URI paths within this server for dynamic servlet loading
CLASSPATH : CLASSPATHs for dynamic servlet loading
AutoReloadDynamicServlets: (True) Should dynamic servlets auto reload
Loader : Class name of ServletLoader for dynamic servlets
PROPERTY.key : Init arg named "key" for a dynamic servlet
PROPERTIES : Name of file of properties for dynamic servlets
PathTranslated : Optional prefix file path for getPathTranslated
SERVLET.name.CLASS : Class name of servlet
SERVLET.name.CLASSPATH : CLASSPATH when loading this servlet
SERVLET.name.PATHS : Pathmap for selecting this servlet
SERVLET.name.CHUNK : (False) Should servlet HTTP/1.1 chunk by default?
SERVLET.name.PROPERTY.key : Init arg named "key" for this servlet
SERVLET.name.PROPERTIES : Name of file of servlet properties
SERVLET.name.Initialize : (False) Initialize this servlet when the server starts?
SERVLET.name.AutoReload : (False) Auto reload this servlet?
SERVLET.name.Loader : Class name of ServletLoader for this servlet

TerseExceptionHandler

No properties for this handler.

NotFoundHandler

No properties for this handler.

TranslateHandler

No properties for this handle.