| 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://jetty.org/configure_9_3.dtd"> |
| 2 |
|
| 3 |
<!-- ================================================================== |
| 4 |
Configure and deploy the test web application in $(jetty.home)/webapps/test |
| 5 |
|
| 6 |
Note. If this file did not exist or used a context path other that /test |
| 7 |
then the default configuration of jetty.xml would discover the test |
| 8 |
webapplication with a WebAppDeployer. By specifying a context in this |
| 9 |
directory, additional configuration may be specified and hot deployments |
| 10 |
detected. |
| 11 |
===================================================================== --> |
| 12 |
|
| 13 |
<Configure id="testWebapp" class="org.eclipse.jetty.webapp.WebAppContext"> |
| 14 |
|
| 15 |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 16 |
<!-- Required minimal context configuration : --> |
| 17 |
<!-- + contextPath --> |
| 18 |
<!-- + war OR resourceBase --> |
| 19 |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 20 |
<Set name="contextPath">/test</Set> |
| 21 |
<Set name="war"><Property name="jetty.webapps" default="."/>/test.war</Set> |
| 22 |
|
| 23 |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 24 |
<!-- Optional context configuration --> |
| 25 |
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> |
| 26 |
<Set name="extractWAR">true</Set> |
| 27 |
<Set name="copyWebDir">false</Set> |
| 28 |
<Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set> |
| 29 |
<Set name="overrideDescriptor"><Property name="jetty.webapps" default="."/>/test.d/override-web.xml</Set> |
| 30 |
|
| 31 |
<!-- Enable WebSocket container --> |
| 32 |
<Call name="setAttribute"> |
| 33 |
<Arg>org.eclipse.jetty.websocket.jsr356</Arg> |
| 34 |
<Arg type="Boolean">true</Arg> |
| 35 |
</Call> |
| 36 |
|
| 37 |
<Set name="gzipHandler"> |
| 38 |
<New class="org.eclipse.jetty.server.handler.gzip.GzipHandler"> |
| 39 |
<Set name="minGzipSize">2048</Set> |
| 40 |
</New> |
| 41 |
</Set> |
| 42 |
|
| 43 |
<!-- Set Caching Classloader that improves performance on resource searching webapps --> |
| 44 |
<!-- |
| 45 |
<Set name="classLoader"> |
| 46 |
<New class="org.eclipse.jetty.webapp.CachingWebAppClassLoader"> |
| 47 |
<Arg><Ref refid="testWebapp"/></Arg> |
| 48 |
</New> |
| 49 |
</Set> |
| 50 |
--> |
| 51 |
|
| 52 |
<!-- Enable symlinks |
| 53 |
<Call name="addAliasCheck"> |
| 54 |
<Arg><New class="org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker"/></Arg> |
| 55 |
</Call> |
| 56 |
--> |
| 57 |
|
| 58 |
<!-- virtual hosts |
| 59 |
<Set name="virtualHosts"> |
| 60 |
<Array type="String"> |
| 61 |
<Item>www.MyVirtualDomain.com</Item> |
| 62 |
<Item>m.MyVirtualDomain.com</Item> |
| 63 |
<Item>*.OtherVirtualDomain.com</Item> |
| 64 |
<Item>@ConnectorName</Item> |
| 65 |
<Item>localhost</Item> |
| 66 |
<Item>127.0.0.1</Item> |
| 67 |
</Array> |
| 68 |
</Set> |
| 69 |
--> |
| 70 |
|
| 71 |
<!-- disable cookies |
| 72 |
<Get name="sessionHandler"> |
| 73 |
<Set name="usingCookies" type="boolean">false</Set> |
| 74 |
</Get> |
| 75 |
--> |
| 76 |
|
| 77 |
<Get name="securityHandler"> |
| 78 |
<Set name="loginService"> |
| 79 |
<New class="org.eclipse.jetty.security.HashLoginService"> |
| 80 |
<Set name="name">Test Realm</Set> |
| 81 |
<Set name="config"><SystemProperty name="jetty.base" default="."/>/etc/realm.properties</Set> |
| 82 |
<!-- To enable reload of realm when properties change, uncomment the following lines --> |
| 83 |
<!-- |
| 84 |
<Set name="hotReload">true</Set> |
| 85 |
<Call name="start"></Call> |
| 86 |
--> |
| 87 |
</New> |
| 88 |
</Set> |
| 89 |
<Set name="authenticator"> |
| 90 |
<New class="org.eclipse.jetty.security.authentication.FormAuthenticator"> |
| 91 |
<Set name="alwaysSaveUri">true</Set> |
| 92 |
</New> |
| 93 |
</Set> |
| 94 |
<Set name="checkWelcomeFiles">true</Set> |
| 95 |
</Get> |
| 96 |
|
| 97 |
<!-- Non standard error page mapping --> |
| 98 |
<!-- |
| 99 |
<Get name="errorHandler"> |
| 100 |
<Call name="addErrorPage"> |
| 101 |
<Arg type="int">500</Arg> |
| 102 |
<Arg type="int">599</Arg> |
| 103 |
<Arg type="String">/dump/errorCodeRangeMapping</Arg> |
| 104 |
</Call> |
| 105 |
</Get> |
| 106 |
--> |
| 107 |
|
| 108 |
<!-- Add context specific logger |
| 109 |
<Call name="insertHandler"> |
| 110 |
<Arg> |
| 111 |
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"> |
| 112 |
<Set name="requestLog"> |
| 113 |
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog"> |
| 114 |
<Set name="filename"><Property name="jetty.logs" default="./logs"/>/test-yyyy_mm_dd.request.log</Set> |
| 115 |
<Set name="filenameDateFormat">yyyy_MM_dd</Set> |
| 116 |
<Set name="append">true</Set> |
| 117 |
<Set name="LogTimeZone">GMT</Set> |
| 118 |
</New> |
| 119 |
</Set> |
| 120 |
</New> |
| 121 |
</Arg> |
| 122 |
</Call> |
| 123 |
--> |
| 124 |
|
| 125 |
</Configure> |