2009-11-08 20:20:48 -05:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
|
|
|
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Configure the Jetty Server -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Documentation of this file format can be found at: -->
|
|
|
|
<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
|
|
|
|
|
|
|
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Server Thread Pool -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Set name="ThreadPool">
|
|
|
|
<!-- Default queued blocking threadpool
|
|
|
|
-->
|
|
|
|
<New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
|
|
|
<Set name="minThreads">10</Set>
|
|
|
|
<Set name="maxThreads">200</Set>
|
|
|
|
</New>
|
|
|
|
|
|
|
|
<!-- Optional Java 5 bounded threadpool with job queue
|
|
|
|
<New class="org.eclipse.thread.concurrent.ThreadPool">
|
|
|
|
<Set name="corePoolSize">50</Set>
|
|
|
|
<Set name="maximumPoolSize">50</Set>
|
|
|
|
</New>
|
|
|
|
-->
|
|
|
|
</Set>
|
|
|
|
|
2009-12-10 22:27:18 -05:00
|
|
|
<!-- Taken from jetty-plus.xml-->
|
2009-11-08 20:20:48 -05:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configurations for WebAppContexts -->
|
|
|
|
<!-- Sequence of configurations to enable Plus features. -->
|
|
|
|
<!-- =========================================================== -->
|
2009-12-10 22:27:18 -05:00
|
|
|
<!-- TODO: test that indeed the corresponding jetty plus jars are available
|
|
|
|
in this classloader. -->
|
2009-11-08 20:20:48 -05:00
|
|
|
<Array id="plusConfig" type="java.lang.String">
|
2009-12-10 22:27:18 -05:00
|
|
|
<Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.plus.webapp.Configuration</Item>
|
|
|
|
<Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
|
|
|
|
<Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
|
2009-11-08 20:20:48 -05:00
|
|
|
</Array>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Set connectors -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
|
|
|
|
<Call name="addConnector">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="host"><Property name="jetty.host" /></Set>
|
|
|
|
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Set name="maxIdleTime">300000</Set>
|
|
|
|
<Set name="Acceptors">2</Set>
|
|
|
|
<Set name="statsOn">false</Set>
|
|
|
|
<Set name="confidentialPort">8443</Set>
|
|
|
|
<Set name="lowResourcesConnections">20000</Set>
|
|
|
|
<Set name="lowResourcesMaxIdleTime">5000</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- To add a HTTPS SSL connector -->
|
|
|
|
<!-- mixin jetty-ssl.xml: -->
|
|
|
|
<!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- To add a HTTP blocking connector -->
|
|
|
|
<!-- mixin jetty-bio.xml: -->
|
|
|
|
<!-- java -jar start.jar etc/jetty.xml etc/jetty-bio.xml -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- To allow Jetty to be started from xinetd -->
|
|
|
|
<!-- mixin jetty-xinetd.xml: -->
|
|
|
|
<!-- java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- See jetty-xinetd.xml for further instructions. -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Set handler Collection Structure -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Set name="handler">
|
|
|
|
<New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
|
|
|
|
<Set name="handlers">
|
|
|
|
<Array type="org.eclipse.jetty.server.Handler">
|
|
|
|
<Item>
|
|
|
|
<New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
|
|
|
|
</Item>
|
|
|
|
<Item>
|
|
|
|
<New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
|
|
|
|
</Item>
|
|
|
|
<Item>
|
|
|
|
<New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
|
|
|
|
</Item>
|
|
|
|
</Array>
|
|
|
|
</Set>
|
|
|
|
</New>
|
|
|
|
</Set>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure the context deployer -->
|
|
|
|
<!-- A context deployer will deploy contexts described in -->
|
|
|
|
<!-- configuration files discovered in a directory. -->
|
|
|
|
<!-- The configuration directory can be scanned for hot -->
|
|
|
|
<!-- deployments at the configured scanInterval. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- This deployer is configured to deploy contexts configured -->
|
|
|
|
<!-- in the $JETTY_HOME/contexts directory -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Call name="addBean">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.ContextDeployer">
|
|
|
|
<Set name="contexts"><Ref id="Contexts"/></Set>
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="configurationDir"><Property name="jetty.home" default="."/>/contexts</Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Set name="scanInterval">5</Set>
|
|
|
|
<Call name="setAttribute">
|
|
|
|
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
|
|
|
<Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure the webapp deployer. -->
|
|
|
|
<!-- A webapp deployer will deploy standard webapps discovered -->
|
|
|
|
<!-- in a directory at startup, without the need for additional -->
|
|
|
|
<!-- configuration files. It does not support hot deploy or -->
|
|
|
|
<!-- non standard contexts (see ContextDeployer above). -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- This deployer is configured to deploy webapps from the -->
|
|
|
|
<!-- $JETTY_HOME/webapps directory -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- Normally only one type of deployer need be used. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Call name="addBean">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.WebAppDeployer">
|
|
|
|
<Set name="contexts"><Ref id="Contexts"/></Set>
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="webAppDir"><Property name="jetty.home" default="."/>/webapps</Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Set name="parentLoaderPriority">false</Set>
|
|
|
|
<Set name="extract">true</Set>
|
|
|
|
<Set name="allowDuplicates">false</Set>
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Call name="setAttribute">
|
|
|
|
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
|
|
|
<Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure Authentication Login Service -->
|
|
|
|
<!-- Realms may be configured for the entire server here, or -->
|
|
|
|
<!-- they can be configured for a specific web app in a context -->
|
|
|
|
<!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
|
|
|
|
<!-- example). -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Call name="addBean">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.security.HashLoginService">
|
|
|
|
<Set name="name">Test Realm</Set>
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="config"><Property name="jetty.home" default="."/>/etc/realm.properties</Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Set name="refreshInterval">0</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- Configure Request Log -->
|
|
|
|
<!-- Request logs may be configured for the entire server here, -->
|
|
|
|
<!-- or they can be configured for a specific web app in a -->
|
|
|
|
<!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
|
|
|
|
<!-- for an example). -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Ref id="RequestLog">
|
|
|
|
<Set name="requestLog">
|
|
|
|
<New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
|
2009-12-10 22:27:18 -05:00
|
|
|
<Set name="filename"><Property name="jetty.home" default="."/>/logs/yyyy_mm_dd.request.log</Set>
|
2009-11-08 20:20:48 -05:00
|
|
|
<Set name="filenameDateFormat">yyyy_MM_dd</Set>
|
|
|
|
<Set name="retainDays">90</Set>
|
|
|
|
<Set name="append">true</Set>
|
|
|
|
<Set name="extended">false</Set>
|
|
|
|
<Set name="logCookies">false</Set>
|
|
|
|
<Set name="LogTimeZone">GMT</Set>
|
|
|
|
</New>
|
|
|
|
</Set>
|
|
|
|
</Ref>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- extra options -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Set name="stopAtShutdown">true</Set>
|
|
|
|
<Set name="sendServerVersion">true</Set>
|
|
|
|
<Set name="sendDateHeader">true</Set>
|
|
|
|
<Set name="gracefulShutdown">1000</Set>
|
|
|
|
|
|
|
|
</Configure>
|