2 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
4 <!-- =============================================================== -->
5 <!-- Configure the Jetty Server -->
7 <!-- Documentation of this file format can be found at: -->
8 <!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
10 <!-- =============================================================== -->
13 <Configure id="Server" class="org.eclipse.jetty.server.Server">
15 <!-- =========================================================== -->
16 <!-- Server Thread Pool -->
17 <!-- =========================================================== -->
18 <Set name="ThreadPool">
19 <!-- Default queued blocking threadpool
21 <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
22 <Set name="minThreads">10</Set>
23 <Set name="maxThreads">200</Set>
26 <!-- Optional Java 5 bounded threadpool with job queue
27 <New class="org.eclipse.thread.concurrent.ThreadPool">
28 <Set name="corePoolSize">50</Set>
29 <Set name="maximumPoolSize">50</Set>
36 <!-- =========================================================== -->
37 <!-- Set connectors -->
38 <!-- =========================================================== -->
40 <Call name="addConnector">
42 <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
43 <Set name="host"><SystemProperty name="jetty.host" /></Set>
44 <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
45 <Set name="maxIdleTime">300000</Set>
46 <Set name="Acceptors">2</Set>
47 <Set name="statsOn">false</Set>
48 <Set name="confidentialPort">8443</Set>
49 <Set name="lowResourcesConnections">20000</Set>
50 <Set name="lowResourcesMaxIdleTime">5000</Set>
55 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
56 <!-- To add a HTTPS SSL connector -->
57 <!-- mixin jetty-ssl.xml: -->
58 <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
59 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
61 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
62 <!-- To add a HTTP blocking connector -->
63 <!-- mixin jetty-bio.xml: -->
64 <!-- java -jar start.jar etc/jetty.xml etc/jetty-bio.xml -->
65 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
67 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
68 <!-- To allow Jetty to be started from xinetd -->
69 <!-- mixin jetty-xinetd.xml: -->
70 <!-- java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml -->
72 <!-- See jetty-xinetd.xml for further instructions. -->
73 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
75 <!-- =========================================================== -->
76 <!-- Set handler Collection Structure -->
77 <!-- =========================================================== -->
79 <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
81 <Array type="org.eclipse.jetty.server.Handler">
83 <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
86 <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
89 <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
96 <!-- =========================================================== -->
97 <!-- Configure the context deployer -->
98 <!-- A context deployer will deploy contexts described in -->
99 <!-- configuration files discovered in a directory. -->
100 <!-- The configuration directory can be scanned for hot -->
101 <!-- deployments at the configured scanInterval. -->
103 <!-- This deployer is configured to deploy contexts configured -->
104 <!-- in the $JETTY_HOME/contexts directory -->
106 <!-- =========================================================== -->
107 <Call name="addBean">
109 <New class="org.eclipse.jetty.deploy.ContextDeployer">
110 <Set name="contexts"><Ref id="Contexts"/></Set>
111 <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
112 <Set name="scanInterval">5</Set>
113 <Call name="setAttribute">
114 <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
115 <Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
121 <!-- =========================================================== -->
122 <!-- Configure the webapp deployer. -->
123 <!-- A webapp deployer will deploy standard webapps discovered -->
124 <!-- in a directory at startup, without the need for additional -->
125 <!-- configuration files. It does not support hot deploy or -->
126 <!-- non standard contexts (see ContextDeployer above). -->
128 <!-- This deployer is configured to deploy webapps from the -->
129 <!-- $JETTY_HOME/webapps directory -->
131 <!-- Normally only one type of deployer need be used. -->
133 <!-- =========================================================== -->
134 <Call name="addBean">
136 <New class="org.eclipse.jetty.deploy.WebAppDeployer">
137 <Set name="contexts"><Ref id="Contexts"/></Set>
138 <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
139 <Set name="parentLoaderPriority">false</Set>
140 <Set name="extract">true</Set>
141 <Set name="allowDuplicates">false</Set>
142 <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
143 <Call name="setAttribute">
144 <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
145 <Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
151 <!-- =========================================================== -->
152 <!-- Configure Authentication Login Service -->
153 <!-- Realms may be configured for the entire server here, or -->
154 <!-- they can be configured for a specific web app in a context -->
155 <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
157 <!-- =========================================================== -->
158 <Call name="addBean">
160 <New class="org.eclipse.jetty.security.HashLoginService">
161 <Set name="name">Test Realm</Set>
162 <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
163 <Set name="refreshInterval">0</Set>
168 <!-- =========================================================== -->
169 <!-- Configure Request Log -->
170 <!-- Request logs may be configured for the entire server here, -->
171 <!-- or they can be configured for a specific web app in a -->
172 <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
173 <!-- for an example). -->
174 <!-- =========================================================== -->
175 <Ref id="RequestLog">
176 <Set name="requestLog">
177 <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
178 <Set name="filename"><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Set>
179 <Set name="filenameDateFormat">yyyy_MM_dd</Set>
180 <Set name="retainDays">90</Set>
181 <Set name="append">true</Set>
182 <Set name="extended">false</Set>
183 <Set name="logCookies">false</Set>
184 <Set name="LogTimeZone">GMT</Set>
189 <!-- =========================================================== -->
190 <!-- extra options -->
191 <!-- =========================================================== -->
192 <Set name="stopAtShutdown">true</Set>
193 <Set name="sendServerVersion">true</Set>
194 <Set name="sendDateHeader">true</Set>
195 <Set name="gracefulShutdown">1000</Set>