...
| Code Block |
|---|
<Item>
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
<Set name="port">8080</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="lowResourceMaxIdleTime">3000</Set>
<Set name="Acceptors">1</Set>
<Set name="StatsOn">true</Set>
</New>
</Item>
|
Request Statistics
To collect request statistics a StatisticsHandler must be configured as one of the handlers of the server. Typically this can be done as the top level handler, but you may wish to configure a statistics handler for just one context. The following jetty.xml fragment shows how to configure a top level statistics handler:
| Code Block |
|---|
<!-- =========================================================== -->
<!-- Set handler Collection Structure -->
<!-- =========================================================== -->
<Set name="handler">
<New class="org.mortbay.jetty.handler.StatisticsHandler">
<Set name="handler">
<New id="handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item><New id="contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/></Item>
<Item><New id="defaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/></Item>
<Item><New id="requestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/></Item>
</Array>
</Set>
</New>
</Set>
</New>
</Set>
|