| 1 | |
| 2 | |
| 3 | <!-- =============================================================== --> |
| 4 | |
| 5 | <!-- Configure the Jetty Server --> |
| 6 | |
| 7 | <!-- =============================================================== --> |
| 8 | |
| 9 | <Configure class="org.mortbay.jetty.Server"> |
| 10 | |
| 11 | |
| 12 | |
| 13 | <!-- =============================================================== --> |
| 14 | |
| 15 | <!-- Configure Logging --> |
| 16 | |
| 17 | <!-- =============================================================== --> |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 24 | |
| 25 | <!-- Configure Jetty Logging. --> |
| 26 | |
| 27 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 28 | |
| 29 | <Call class="org.mortbay.log.LogFactory" name="getFactory"> |
| 30 | |
| 31 | <Call name="getInstance"> |
| 32 | |
| 33 | <Arg/> |
| 34 | |
| 35 | <Call name="reset"/> |
| 36 | |
| 37 | <Call name="add"> |
| 38 | |
| 39 | <Arg> |
| 40 | |
| 41 | <New class="org.mortbay.log.OutputStreamLogSink"> |
| 42 | |
| 43 | <Set name="filename"><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.jetty.log</Set> |
| 44 | |
| 45 | <Set name="retainDays">90</Set> |
| 46 | |
| 47 | <Set name="append">true</Set> |
| 48 | |
| 49 | <Set name="logLabels">true</Set> |
| 50 | |
| 51 | <Set name="logStackSize">true</Set> |
| 52 | |
| 53 | <Set name="logStackTrace">false</Set> |
| 54 | |
| 55 | <Set name="logOneLine">false</Set> |
| 56 | |
| 57 | <Set name="suppressStack">false</Set> |
| 58 | |
| 59 | <Set name="logTimeZone">GMT</Set> |
| 60 | |
| 61 | </New> |
| 62 | |
| 63 | </Arg> |
| 64 | |
| 65 | </Call> |
| 66 | |
| 67 | </Call> |
| 68 | |
| 69 | </Call> |
| 70 | |
| 71 | |
| 72 | |
| 73 | <!-- =============================================================== --> |
| 74 | |
| 75 | <!-- Configure the Request Listeners --> |
| 76 | |
| 77 | <!-- =============================================================== --> |
| 78 | |
| 79 | |
| 80 | |
| 81 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 82 | |
| 83 | <!-- Add and configure a HTTP listener to port 8080 --> |
| 84 | |
| 85 | <!-- The default port can be changed using: java -Djetty.port=80 --> |
| 86 | |
| 87 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 88 | |
| 89 | <Call name="addListener"> |
| 90 | |
| 91 | <Arg> |
| 92 | |
| 93 | <New class="org.mortbay.http.SocketListener"> |
| 94 | |
| 95 | <Set name="Port"><SystemProperty name="jetty.port" default="8180"/></Set> |
| 96 | |
| 97 | <Set name="PoolName">P1</Set> |
| 98 | |
| 99 | <Set name="MinThreads">20</Set> |
| 100 | |
| 101 | <Set name="MaxThreads">200</Set> |
| 102 | |
| 103 | <Set name="lowResources">50</Set> |
| 104 | |
| 105 | <Set name="MaxIdleTimeMs">30000</Set> |
| 106 | |
| 107 | <Set name="LowResourcePersistTimeMs">2000</Set> |
| 108 | |
| 109 | <Set name="acceptQueueSize">0</Set> |
| 110 | |
| 111 | <Set name="ConfidentialPort">8443</Set> |
| 112 | |
| 113 | <Set name="IntegralPort">8443</Set> |
| 114 | |
| 115 | </New> |
| 116 | |
| 117 | </Arg> |
| 118 | |
| 119 | </Call> |
| 120 | |
| 121 | |
| 122 | |
| 123 | |
| 124 | |
| 125 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 126 | |
| 127 | <!-- Add a HTTPS SSL listener on port 8443 --> |
| 128 | |
| 129 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 130 | |
| 131 | <!-- UNCOMMENT TO ACTIVATE |
| 132 | |
| 133 | <Call name="addListener"> |
| 134 | |
| 135 | <Arg> |
| 136 | |
| 137 | <New class="org.mortbay.http.SslListener"> |
| 138 | |
| 139 | <Set name="Port">8443</Set> |
| 140 | |
| 141 | <Set name="PoolName">P1</Set> |
| 142 | |
| 143 | <Set name="MaxIdleTimeMs">30000</Set> |
| 144 | |
| 145 | <Set name="lowResources">30</Set> |
| 146 | |
| 147 | <Set name="LowResourcePersistTimeMs">2000</Set> |
| 148 | |
| 149 | <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/etc/demokeystore</Set> |
| 150 | |
| 151 | <Set name="Password">OBF:1vny1zlo1x8e1vnw1vn61x8g1zlu1vn4</Set> |
| 152 | |
| 153 | <Set name="KeyPassword">OBF:1u2u1wml1z7s1z7a1wnl1u2g</Set> |
| 154 | |
| 155 | |
| 156 | |
| 157 | <Set name="HttpHandler"> |
| 158 | |
| 159 | <New class="org.mortbay.http.handler.MsieSslHandler"> |
| 160 | |
| 161 | <Set name="UserAgentSubString">MSIE 5</Set> |
| 162 | |
| 163 | </New> |
| 164 | |
| 165 | </Set> |
| 166 | |
| 167 | </New> |
| 168 | |
| 169 | </Arg> |
| 170 | |
| 171 | </Call> |
| 172 | |
| 173 | --> |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 180 | |
| 181 | <!-- Add a AJP13 listener on port 8009 --> |
| 182 | |
| 183 | <!-- This protocol can be used with mod_jk in apache, IIS etc. --> |
| 184 | |
| 185 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 186 | |
| 187 | <!-- |
| 188 | |
| 189 | |
| 190 | |
| 191 | <Call name="addListener"> |
| 192 | |
| 193 | <Arg> |
| 194 | |
| 195 | <New class="org.mortbay.http.ajp.AJP13Listener"> |
| 196 | |
| 197 | <Set name="Port">8009</Set> |
| 198 | |
| 199 | <Set name="MinThreads">5</Set> |
| 200 | |
| 201 | <Set name="MaxThreads">20</Set> |
| 202 | |
| 203 | <Set name="MaxIdleTimeMs">0</Set> |
| 204 | |
| 205 | <Set name="confidentialPort">443</Set> |
| 206 | |
| 207 | </New> |
| 208 | |
| 209 | </Arg> |
| 210 | |
| 211 | </Call> |
| 212 | |
| 213 | --> |
| 214 | |
| 215 | |
| 216 | |
| 217 | <!-- =============================================================== --> |
| 218 | |
| 219 | <!-- Set the default web application configuration mechanisms: --> |
| 220 | |
| 221 | <!-- XMLConfiguration - handles WEB-INF/web.xml --> |
| 222 | |
| 223 | <!-- JettyWebConfiguration - handles WEB-INF/jetty-web.xml --> |
| 224 | |
| 225 | <!-- jsr77.Configuration - Adds jsr77 statistics to servlets --> |
| 226 | |
| 227 | <!-- --> |
| 228 | |
| 229 | <!-- Order of these classes is significant. The defaults set here --> |
| 230 | |
| 231 | <!-- can be overridden by calling setConfigurationClassNames() on --> |
| 232 | |
| 233 | <!-- the webapp context. --> |
| 234 | |
| 235 | <!-- The TagLibconfiguration scans any tld files found for --> |
| 236 | |
| 237 | <!-- additional j2ee listener classes - needed for JSF --> |
| 238 | |
| 239 | <!-- The jsr77 configuration requires additional jars on the --> |
| 240 | |
| 241 | <!-- on the classpath and it needs jmx enabled. --> |
| 242 | |
| 243 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 244 | |
| 245 | <Set name="WebApplicationConfigurationClassNames"> |
| 246 | |
| 247 | <Array type="java.lang.String"> |
| 248 | |
| 249 | <Item>org.mortbay.jetty.servlet.XMLConfiguration</Item> |
| 250 | |
| 251 | <Item>org.mortbay.jetty.servlet.JettyWebConfiguration</Item> |
| 252 | |
| 253 | |
| 254 | |
| 255 | <!-- |
| 256 | |
| 257 | <Item>org.mortbay.jetty.servlet.TagLibConfiguration</Item> |
| 258 | |
| 259 | <Item>org.mortbay.jetty.servlet.jsr77.Configuration</Item> |
| 260 | |
| 261 | --> |
| 262 | |
| 263 | </Array> |
| 264 | |
| 265 | </Set> |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | <!-- =============================================================== --> |
| 272 | |
| 273 | <!-- Configure the Contexts --> |
| 274 | |
| 275 | <!-- =============================================================== --> |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 282 | |
| 283 | <!-- Add a all web application within the webapps directory. --> |
| 284 | |
| 285 | <!-- + No virtual host specified --> |
| 286 | |
| 287 | <!-- + Look in the webapps directory relative to jetty.home or . --> |
| 288 | |
| 289 | <!-- + Use the webdefault.xml resource for the defaults descriptor --> |
| 290 | |
| 291 | <!-- + Upack the war file --> |
| 292 | |
| 293 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 294 | |
| 295 | <Set name="rootWebApp">root</Set> |
| 296 | |
| 297 | |
| 298 | |
| 299 | <Call name="addWebApplications"> |
| 300 | |
| 301 | <Arg></Arg> |
| 302 | |
| 303 | <Arg><SystemProperty name="jetty.home" default="."/>/webapps/</Arg> |
| 304 | |
| 305 | <Arg><SystemProperty name="jetty.home" default="."/>/webdefault.xml</Arg> |
| 306 | |
| 307 | <Arg type="boolean">true</Arg> |
| 308 | |
| 309 | <Arg type="boolean">false</Arg> |
| 310 | |
| 311 | </Call> |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 318 | |
| 319 | <!-- Add and configure a specific web application --> |
| 320 | |
| 321 | <!-- + Set Unpack WAR files --> |
| 322 | |
| 323 | <!-- + Set Default Descriptor. Resource, file or URL --> |
| 324 | |
| 325 | <!-- + Set java 2 complaint classloading --> |
| 326 | |
| 327 | <!-- + Set Virtual Hosts. A Null host or empty array means all hosts --> |
| 328 | |
| 329 | <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 330 | |
| 331 | <!-- UNCOMMENT TO ACTIVATE |
| 332 | |
| 333 | <Call name="addWebApplication"> |
| 334 | |
| 335 | <Arg>/context</Arg> |
| 336 | |
| 337 | <Arg>./webapps/root</Arg> |
| 338 | |
| 339 | |
| 340 | |
| 341 | <Set name="extractWAR">false</Set> |
| 342 | |
| 343 | <Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set> |
| 344 | |
| 345 | <Set name="classLoaderJava2Compliant">true</Set> |
| 346 | |
| 347 | |
| 348 | |
| 349 | <Set name="virtualHosts"> |
| 350 | |
| 351 | <Array type="java.lang.String"> |
| 352 | |
| 353 | <Item></Item> |
| 354 | |
| 355 | <Item>127.0.0.1</Item> |
| 356 | |
| 357 | <Item>localhost</Item> |
| 358 | |
| 359 | <Item>www.acme.com</Item> |
| 360 | |
| 361 | </Array> |
| 362 | |
| 363 | </Set> |
| 364 | |
| 365 | </Call> |
| 366 | |
| 367 | --> |
| 368 | |
| 369 | |
| 370 | |
| 371 | <!-- =============================================================== --> |
| 372 | |
| 373 | <!-- Configure the Request Log --> |
| 374 | |
| 375 | <!-- =============================================================== --> |
| 376 | |
| 377 | <Set name="RequestLog"> |
| 378 | |
| 379 | <New class="org.mortbay.http.NCSARequestLog"> |
| 380 | |
| 381 | <Arg><SystemProperty name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Arg> |
| 382 | |
| 383 | <Set name="retainDays">90</Set> |
| 384 | |
| 385 | <Set name="append">true</Set> |
| 386 | |
| 387 | <Set name="extended">false</Set> |
| 388 | |
| 389 | <Set name="LogTimeZone">GMT</Set> |
| 390 | |
| 391 | </New> |
| 392 | |
| 393 | </Set> |
| 394 | |
| 395 | |
| 396 | |
| 397 | <!-- =============================================================== --> |
| 398 | |
| 399 | <!-- Configure the Other Server Options --> |
| 400 | |
| 401 | <!-- =============================================================== --> |
| 402 | |
| 403 | <Set name="requestsPerGC">2000</Set> |
| 404 | |
| 405 | <Set name="statsOn">false</Set> |
| 406 | |
| 407 | <Set class="org.mortbay.util.FileResource" name="checkAliases" type="boolean">true</Set> |
| 408 | |
| 409 | |
| 410 | |
| 411 | <!-- System classes cannot be overriden by a HttpContext or webapp |
| 412 | |
| 413 | <Set name="systemClasses"> |
| 414 | |
| 415 | <Array type="java.lang.String"> |
| 416 | |
| 417 | <Item>java.</Item> |
| 418 | |
| 419 | <Item>javax.servlet.</Item> |
| 420 | |
| 421 | <Item>javax.xml.</Item> |
| 422 | |
| 423 | <Item>org.mortbay.</Item> |
| 424 | |
| 425 | <Item>org.xml.</Item> |
| 426 | |
| 427 | <Item>org.w3c.</Item> |
| 428 | |
| 429 | <Item>org.apache.commons.logging.</Item> |
| 430 | |
| 431 | </Array> |
| 432 | |
| 433 | </Set> |
| 434 | |
| 435 | --> |
| 436 | |
| 437 | |
| 438 | |
| 439 | <!-- Server classes are hidden from a HttpContext or webapp |
| 440 | |
| 441 | <Set name="serverClasses"> |
| 442 | |
| 443 | <Array type="java.lang.String"> |
| 444 | |
| 445 | <Item>-org.mortbay.http.PathMap</Item> |
| 446 | |
| 447 | <Item>org.mortbay.http.</Item> |
| 448 | |
| 449 | <Item>-org.mortbay.jetty.servlet.Default</Item> |
| 450 | |
| 451 | <Item>-org.mortbay.jetty.servlet.Invoker</Item> |
| 452 | |
| 453 | <Item>-org.mortbay.jetty.servlet.JSR154Filter</Item> |
| 454 | |
| 455 | <Item>org.mortbay.jetty.</Item> |
| 456 | |
| 457 | <Item>org.mortbay.start.</Item> |
| 458 | |
| 459 | <Item>org.mortbay.stop.</Item> |
| 460 | |
| 461 | </Array> |
| 462 | |
| 463 | </Set> |
| 464 | |
| 465 | --> |
| 466 | |
| 467 | |
| 468 | |
| 469 | </Configure> |