| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <!DOCTYPE Configure PUBLIC |
| "-//Mort Bay Consulting//DTD Configure 1.0//EN" |
| "http://jetty.mortbay.com/configure_1_0.dtd"> |
| |
| <!-- |
| 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"> |
| <Arg> |
| <New class="com.mortbay.HTTP.SocketListener"> |
| <Set name="Port">9090</Set> |
| <Set name="MinThreads">5</Set> |
| <Set name="MaxThreads">255</Set> |
| <Set name="MaxIdleTimeMs">60000</Set> |
| <Set name="MaxReadTimeMs">60000</Set> |
| </New> |
| </Arg> |
| </Call> |
| |
| <Call name="addWebApplication"> |
| <Arg>/jcs/*</Arg> |
| <Arg><SystemProperty name="jetty.home" default="../../"/>webapps/jcs/</Arg> |
| <Arg></Arg> |
| </Call> |
| |
| <Call name="addContext"> |
| <Arg>/</Arg> |
| <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"> |
| <Arg>Dump</Arg> |
| <Arg>/dump/*,/handler/Dump,/handler/Dump/*</Arg> |
| <Arg>com.mortbay.Servlet.Dump</Arg> |
| </Call> |
| <Call name="addServlet"> |
| <Arg>JSP</Arg> |
| <Arg>*.jsp,*.jsP,*.jSp,*.jSP,*.Jsp,*.JsP,*.JSp,*.JSP</Arg> |
| <Arg>org.apache.jasper.servlet.JspServlet</Arg> |
| </Call> |
| </Call> |
| |
| <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> |
| </New> |
| </Set> |
| |
| </Configure> |
| |