blob: 38cd2383cfa28b157a67e13eae69eadf561e7188 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
"-//Mort Bay Consulting//DTD Configure 1.0//EN"
This is a Jetty HTTP server configuration file. This configuration
uses the generic com.mortbay.Util.XmlConfiguration class to call
the normal com.mortbay.HTTP.HttpServer configuration API from
within an XML script.
The format of this file is described in the configure.dtd file.
The API that can be called by this file is described in the
Javadoc for Jetty.
The following concepts must be understood when configuring
a server:
Listener: is a network interface object that
accepts HTTP requests for the server. SocketListeners accept
normal requests, while JsseListeners accept SSL requests.
The threading model of the server is controlled by the
listener parameters.
WebApplication: is a bundled collection of resources,
servlets and configuration that can provide a unified
WWW application. It is part of the 2.2 servlet standard.
The contents of the application are configured by the
web.xml deployment descriptor within the application.
The configuration of the application within Jetty requires
on the context of the application to be set.
Context: is a grouping of server resources that share
the same URL path prefix, class path and resource base.
A Web application is an example of a specific context.
Generic contexts may have arbitrary request handlers
added to them. All contexts have a path specification
(frequently the default "/") and an option virtual
host alias.
Handler: Handlers are the objects that actually
service the HTTP requests. Examples of Handlers include
ServletHandler, ResourceHandler and NotFoundHandler.
Handlers are contained within Contexts, which provide
conveniance methods for the common handlers so
that servlet and file serving may be configured for
a context without explicit creation of a Handler.
This file configures:
+ A listener at port 8080 on all known interfaces
+ The default web applicaton at /default/* context
+ Dynamic servlet context at /servlet/*
+ A context at / with serving files from ./docroot and
the dump servlet at /dump.
<Configure class="com.mortbay.HTTP.HttpServer">
<Call name="addListener">
<New class="com.mortbay.HTTP.SocketListener">
<Set name="Port">9091</Set>
<Set name="MinThreads">5</Set>
<Set name="MaxThreads">255</Set>
<Set name="MaxIdleTimeMs">60000</Set>
<Set name="MaxReadTimeMs">60000</Set>
<Call name="addWebApplication">
<Arg><SystemProperty name="jetty.home" default="../../"/>webapps/jcs/</Arg>
<Call name="addContext">
<Set name="ClassPath"><SystemProperty name="jetty.home" default="."/>/servlets/</Set>
<Set name="DynamicServletPathSpec">/servlet/*</Set>
<Set name="ResourceBase"><SystemProperty name="jetty.home" default="."/>/docroot/</Set>
<Set name="ServingResources">TRUE</Set>
<Call name="addServlet">
<Call name="addServlet">
<Set name="LogSink">
<New class="com.mortbay.Util.WriterLogSink">
<Arg><SystemProperty name="jetty.log" default="../../logs"/>/yyyy_mm_dd.request.log</Arg>
<Set name="RetainDays">90</Set>
<Set name="Append">true</Set>