2016-06-10 19:10:59 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
|
2005-12-18 05:39:52 +00:00
|
|
|
|
2009-06-15 15:22:51 +00:00
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- This is the configuration for a standalone i2psnark and -->
|
|
|
|
<!-- jetty instance connecting to a router in another jvm. -->
|
|
|
|
<!-- Run it with the launch-i2psnark script. -->
|
|
|
|
<!-- i2psnark will be accessed at http://127.0.0.1:8002/ -->
|
|
|
|
<!-- =============================================================== -->
|
2005-12-18 05:39:52 +00:00
|
|
|
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Configure the Jetty Server -->
|
|
|
|
<!-- =============================================================== -->
|
2016-06-10 19:10:59 +00:00
|
|
|
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
2005-12-18 05:39:52 +00:00
|
|
|
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Configure the Request Listeners -->
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
2009-06-15 15:22:51 +00:00
|
|
|
<!-- Add and configure a HTTP listener to port 8002 -->
|
2005-12-18 05:39:52 +00:00
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
2016-06-10 19:10:59 +00:00
|
|
|
<Call name="addConnector">
|
2005-12-18 05:39:52 +00:00
|
|
|
<Arg>
|
2016-06-10 19:10:59 +00:00
|
|
|
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
|
|
|
|
<Set name="host">127.0.0.1</Set>
|
|
|
|
<Set name="port">8002</Set>
|
|
|
|
<Set name="maxIdleTime">600000</Set>
|
|
|
|
<Set name="Acceptors">1</Set>
|
|
|
|
<Set name="statsOn">false</Set>
|
|
|
|
<Set name="lowResourcesConnections">5000</Set>
|
|
|
|
<Set name="lowResourcesMaxIdleTime">5000</Set>
|
|
|
|
<Set name="useDirectBuffers">false</Set>
|
|
|
|
</New>
|
2005-12-18 05:39:52 +00:00
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Configure the Contexts -->
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
|
2016-06-10 19:10:59 +00:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- 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>
|
|
|
|
</Array>
|
|
|
|
</Set>
|
|
|
|
</New>
|
|
|
|
</Set>
|
2005-12-18 05:39:52 +00:00
|
|
|
|
2016-06-10 19:10:59 +00:00
|
|
|
<!-- =============================================================== -->
|
|
|
|
<!-- Create the deployment manager -->
|
|
|
|
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
|
|
|
|
<!-- The deplyment manager handles the lifecycle of deploying web -->
|
|
|
|
<!-- applications. Apps are provided by instances of the -->
|
|
|
|
<!-- AppProvider interface. Typically these are provided by -->
|
|
|
|
<!-- one or more of: -->
|
|
|
|
<!-- jetty-webapps.xml - monitors webapps for wars and dirs -->
|
|
|
|
<!-- jetty-contexts.xml - monitors contexts for context xml -->
|
|
|
|
<!-- jetty-templates.xml - monitors contexts and templates -->
|
|
|
|
<!-- =============================================================== -->
|
|
|
|
<Call name="addBean">
|
|
|
|
<Arg>
|
|
|
|
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
|
|
|
|
<Set name="contexts">
|
|
|
|
<Ref id="Contexts" />
|
|
|
|
</Set>
|
|
|
|
<Call name="setContextAttribute">
|
|
|
|
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
|
|
|
|
<Arg>.*/.*jsp-api-[^/]*\.jar$|.*/.*jsp-[^/]*\.jar$|.*/.*taglibs[^/]*\.jar$</Arg>
|
|
|
|
</Call>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
2005-12-18 05:39:52 +00:00
|
|
|
|
2016-06-10 19:10:59 +00:00
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- 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 -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Ref id="DeploymentManager">
|
|
|
|
<Call name="addAppProvider">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.providers.ContextProvider">
|
|
|
|
<Set name="monitoredDirName">./contexts</Set>
|
|
|
|
<Set name="scanInterval">0</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
</Ref>
|
|
|
|
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<!-- 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. -->
|
|
|
|
<!-- -->
|
|
|
|
<!-- =========================================================== -->
|
|
|
|
<Ref id="DeploymentManager">
|
|
|
|
<Call id="webappprovider" name="addAppProvider">
|
|
|
|
<Arg>
|
|
|
|
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
|
|
|
|
<Set name="monitoredDirName">./webapps</Set>
|
|
|
|
<Set name="parentLoaderPriority">false</Set>
|
|
|
|
<Set name="extractWars">false</Set>
|
|
|
|
<Set name="scanInterval">0</Set>
|
|
|
|
</New>
|
|
|
|
</Arg>
|
|
|
|
</Call>
|
|
|
|
</Ref>
|
|
|
|
|
|
|
|
<!-- ===================== -->
|
|
|
|
<!-- DefaultHandler config -->
|
|
|
|
<!-- http://stackoverflow.com/questions/4202275/how-to-prevent-jetty-from-showing-context-related-information -->
|
|
|
|
<!-- ===================== -->
|
|
|
|
<Ref id="DefaultHandler">
|
|
|
|
<Set name="showContexts">false</Set>
|
|
|
|
</Ref>
|
2005-12-18 05:39:52 +00:00
|
|
|
|
|
|
|
</Configure>
|