Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-9.4.x-5201-QueuedThreadPoolDump

This commit is contained in:
Lachlan Roberts 2020-09-03 15:00:47 +10:00
commit 26ae875d1c
29 changed files with 1166 additions and 1038 deletions

View File

@ -26,4 +26,4 @@ include::default-logging-with-stderrlog.adoc[]
include::configuring-jetty-request-logs.adoc[]
include::configuring-logging-modules.adoc[]
include::example-logback-centralized-logging.adoc[]
include::dump-tool.adoc[]
include::jetty-server-dump.adoc[]

View File

@ -1,837 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
// ========================================================================
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
[[jetty-dump-tool]]
=== Jetty Dump Tool
The dump feature in Jetty provides a good snapshot of the status of the threadpool, select sets, classloaders, and so forth.
To get maximum detail from the dump, you need to `setDetailDump(true)` on any `QueuedThreadPools` you are using.
You can do this by a direct call if you are embedding Jetty, or in `jetty.xml`.
[[configuring-dump-feature]]
==== Configuring the Dump Feature in jetty.xml
You can request that Jetty do a dump immediately after starting and just before stopping by calling the appropriate setters on the `Server` instance.
This can be accomplished in `jetty.xml` with:
[source, xml, subs="{sub-order}"]
----
<Set name="dumpAfterStart">true</Set>
<Set name="dumpBeforeStop">true</Set>
----
[[extra-threadpool-info]]
==== Extra ThreadPool Information
You can get additional detail from the `QueuedThreadPool` if `setDetailedDump(true)` is called on the thread pool instance.
Do this in `jetty.xml` as follows:
[source, xml, subs="{sub-order}"]
----
<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>
<Set name="detailedDump">true</Set>
</New>
</Set>
----
[[dump-tool-via-jmx]]
==== Using the Dump Feature via JMX
The `dump` method is on the Server instance and many of its nested components (Handlers, Connectors, and so forth).
Dumps may be obtained by calling these methods either in code or via JMX (see xref:using-jmx[]).
The Server MBean has a `dump()` method, which dumps everything, plus a `dumpStdErr()` operation that dumps to StdErr rather than replying to JConsole.
[[examing-jetty-distro-dump]]
==== Examining a Jetty Distribution Dump
This is a dump of the stock jetty-distribution with extra threadpool information:
....
org.eclipse.jetty.server.Server@76f08fe1 - STARTING
+= qtp1062680061{STARTED,10<=13<=200,i=1,q=0} - STARTED
| +- 12 qtp1062680061-12-selector-0 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 13 qtp1062680061-13-selector-6 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 14 qtp1062680061-14-selector-5 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 15 qtp1062680061-15-acceptor-0-ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090} BLOCKED
| | +- sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:210)
| | +- org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:284)
| | +- org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:460)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 16 qtp1062680061-16-selector-1 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 17 qtp1062680061-17-selector-2 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 18 qtp1062680061-18-selector-3 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 19 qtp1062680061-19-selector-4 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 20 qtp1062680061-20-selector-7 RUNNABLE
| | +- sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
| | +- sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:159)
| | +- sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103)
| | +- sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
| | +- sun.nio.ch.SelectorImpl.select(SelectorImpl.java:102)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:435)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 21 qtp1062680061-21-acceptor-1-ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090} RUNNABLE
| | +- sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
| | +- sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:226)
| | +- org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:284)
| | +- org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:460)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 49 qtp1062680061-49-acceptor-2-ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090} BLOCKED
| | +- sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:210)
| | +- org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:284)
| | +- org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:460)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 50 qtp1062680061-50-acceptor-3-ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090} BLOCKED
| | +- sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:210)
| | +- org.eclipse.jetty.server.ServerConnector.accept(ServerConnector.java:284)
| | +- org.eclipse.jetty.server.AbstractConnector$Acceptor.run(AbstractConnector.java:460)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:596)
| | +- org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:527)
| | +- java.lang.Thread.run(Thread.java:722)
| +- 52 qtp1062680061-52 TIMED_WAITING IDLE
+= org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@725f5 - STARTED
+= org.eclipse.jetty.server.handler.HandlerCollection@58b37561 - STARTED
| += org.eclipse.jetty.server.handler.ContextHandlerCollection@64c6e290 - STARTED
| | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | += o.e.j.w.WebAppContext@7ea88b1c{/async-rest,[file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/, jar:file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.2.v20130417.jar!/META-INF/resources/],AVAILABLE}{/async-rest.war} - STARTED
| | | += org.eclipse.jetty.server.session.SessionHandler@6dfb8d2e - STARTED
| | | | += org.eclipse.jetty.server.session.HashSessionManager@6cb83869 - STARTED
| | | | += org.eclipse.jetty.security.ConstraintSecurityHandler@2848c90e - STARTED
| | | | | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@52b12fef
| | | | | += org.eclipse.jetty.servlet.ServletHandler@46bac287 - STARTED
| | | | | | += default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true - STARTED
| | | | | | | +- maxCacheSize=256000000
| | | | | | | +- etags=true
| | | | | | | +- dirAllowed=true
| | | | | | | +- gzip=true
| | | | | | | +- maxCachedFileSize=200000000
| | | | | | | +- redirectWelcome=false
| | | | | | | +- acceptRanges=true
| | | | | | | +- welcomeServlets=false
| | | | | | | +- aliases=false
| | | | | | | +- useFileMappedBuffer=true
| | | | | | | +- maxCachedFiles=2048
| | | | | | +- [/]=>default
| | | | | | += jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true - STARTED
| | | | | | | +- logVerbosityLevel=DEBUG
| | | | | | | +- fork=false
| | | | | | | +- com.sun.appserv.jsp.classpath=/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar:/home/user/jetty-distribution-{VERSION}/resources:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/start.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/opt/local/lib/libsvnjavahl-1.0.dylib:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/libAppleScriptEngine.jnilib:/System/Library/Java/Extensions/libJ3D.jnilib:/System/Library/Java/Extensions/libJ3DAudio.jnilib:/System/Library/Java/Extensions/libJ3DUtils.jnilib:/System/Library/Java/Extensions/libmlib_jai.jnilib:/System/Library/Java/Extensions/libQTJNative.jnilib:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/usr/lib/java/libjdns_sd.jnilib
| | | | | | | +- scratchdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/jsp
| | | | | | | +- xpoweredBy=false
| | | | | | +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | | | | += SerialRestServlet@461411d==org.eclipse.jetty.example.asyncrest.SerialRestServlet,-1,false - STARTED
| | | | | | +- [/testSerial]=>SerialRestServlet
| | | | | | += AsyncRestServlet@73eb9bd5==org.eclipse.jetty.example.asyncrest.AsyncRestServlet,-1,false - STARTED
| | | | | | +- [/testAsync]=>AsyncRestServlet
| | | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | += HashLoginService[Test Realm] - STARTED
| | | | | +- org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | | +- org.eclipse.jetty.security.authentication.BasicAuthenticator@7b239469
| | | | | |
| | | | | +> HashLoginService[Test Realm] - STARTED
| | | | | +> org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | | +> org.eclipse.jetty.security.authentication.BasicAuthenticator@7b239469
| | | | | +> []
| | | | | +> /={TRACE={RoleInfo,F,C[]}}
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | += org.eclipse.jetty.servlet.ErrorPageErrorHandler@3c121009 - STARTED
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | |
| | | +> WebAppClassLoader=Async REST Webservice Example@52934ea0
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/classes/
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.2.v20130417.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-client-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-util-ajax-{VERSION}.jar
| | | | +- startJarLoader@7194b34a
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/resources/
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar
| | | | +- sun.misc.Launcher$AppClassLoader@19d1b44b
| | | | +- file:/home/user/jetty-distribution-{VERSION}/start.jar
| | | | +- sun.misc.Launcher$ExtClassLoader@1693b52b
| | | +> javax.servlet.context.tempdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-
| | | +> org.apache.catalina.jsp_classpath=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/classes:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.2.v20130417.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-client-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/jetty-util-ajax-{VERSION}.jar
| | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | | +> com.sun.jsp.taglibraryCache={}
| | | +> com.sun.jsp.tagFileJarUrlsCache={}
| | += o.e.j.s.h.MovedContextHandler@5e0c8d24{/oldContextPath,null,AVAILABLE} - STARTED
| | | += org.eclipse.jetty.server.handler.MovedContextHandler$Redirector@2a4200d3 - STARTED
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | |
| | | +> No ClassLoader
| | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | += o.e.j.w.WebAppContext@6f01ba6f{/,file:/home/user/jetty-distribution-{VERSION}/webapps/ROOT/,AVAILABLE}{/ROOT} - STARTED
| | | += org.eclipse.jetty.server.session.SessionHandler@5a770658 - STARTED
| | | | += org.eclipse.jetty.server.session.HashSessionManager@746a95ae - STARTED
| | | | += org.eclipse.jetty.security.ConstraintSecurityHandler@1890e38 - STARTED
| | | | | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@6242c657
| | | | | += org.eclipse.jetty.servlet.ServletHandler@debac27 - STARTED
| | | | | | += default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true - STARTED
| | | | | | | +- maxCacheSize=256000000
| | | | | | | +- etags=true
| | | | | | | +- dirAllowed=true
| | | | | | | +- gzip=true
| | | | | | | +- maxCachedFileSize=200000000
| | | | | | | +- redirectWelcome=false
| | | | | | | +- acceptRanges=true
| | | | | | | +- welcomeServlets=false
| | | | | | | +- aliases=false
| | | | | | | +- useFileMappedBuffer=true
| | | | | | | +- maxCachedFiles=2048
| | | | | | +- [/]=>default
| | | | | | += jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true - STARTED
| | | | | | | +- logVerbosityLevel=DEBUG
| | | | | | | +- fork=false
| | | | | | | +- com.sun.appserv.jsp.classpath=/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar:/home/user/jetty-distribution-{VERSION}/resources:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/start.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/opt/local/lib/libsvnjavahl-1.0.dylib:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/libAppleScriptEngine.jnilib:/System/Library/Java/Extensions/libJ3D.jnilib:/System/Library/Java/Extensions/libJ3DAudio.jnilib:/System/Library/Java/Extensions/libJ3DUtils.jnilib:/System/Library/Java/Extensions/libmlib_jai.jnilib:/System/Library/Java/Extensions/libQTJNative.jnilib:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/usr/lib/java/libjdns_sd.jnilib
| | | | | | | +- scratchdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-ROOT-_-any-/jsp
| | | | | | | +- xpoweredBy=false
| | | | | | +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | +~ HashLoginService[Test Realm] - STARTED
| | | | | +- org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | | +- org.eclipse.jetty.security.authentication.BasicAuthenticator@6b733b94
| | | | | |
| | | | | +> HashLoginService[Test Realm] - STARTED
| | | | | +> org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | | +> org.eclipse.jetty.security.authentication.BasicAuthenticator@6b733b94
| | | | | +> []
| | | | | +> /={TRACE={RoleInfo,F,C[]}}
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | += org.eclipse.jetty.servlet.ErrorPageErrorHandler@3c41a9ce - STARTED
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | |
| | | +> WebAppClassLoader=ROOT@7af33249
| | | | +- startJarLoader@7194b34a
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/resources/
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar
| | | | +- sun.misc.Launcher$AppClassLoader@19d1b44b
| | | | +- file:/home/user/jetty-distribution-{VERSION}/start.jar
| | | | +- sun.misc.Launcher$ExtClassLoader@1693b52b
| | | +> javax.servlet.context.tempdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-ROOT-_-any-
| | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | | +> com.sun.jsp.taglibraryCache={}
| | | +> com.sun.jsp.tagFileJarUrlsCache={}
| | += o.e.j.s.h.ContextHandler@7b2dffdf{/javadoc,file:/home/user/jetty-distribution-{VERSION}/javadoc,AVAILABLE} - STARTED
| | | += org.eclipse.jetty.server.handler.ResourceHandler@8f9c8a7 - STARTED
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | |
| | | +> No ClassLoader
| | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | += o.e.j.w.WebAppContext@716d9094{/test,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/,AVAILABLE}{/test.war} - STARTED
| | | += org.eclipse.jetty.server.session.SessionHandler@336abd81 - STARTED
| | | | += org.eclipse.jetty.server.session.HashSessionManager@1246f8d0 - STARTED
| | | | += org.eclipse.jetty.security.ConstraintSecurityHandler@7179290f - STARTED
| | | | | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@17d41d12
| | | | | += org.eclipse.jetty.servlet.ServletHandler@5034037e - STARTED
| | | | | | += default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true - STARTED
| | | | | | | +- maxCacheSize=256000000
| | | | | | | +- etags=true
| | | | | | | +- dirAllowed=true
| | | | | | | +- gzip=true
| | | | | | | +- maxCachedFileSize=200000000
| | | | | | | +- redirectWelcome=false
| | | | | | | +- acceptRanges=true
| | | | | | | +- welcomeServlets=false
| | | | | | | +- aliases=false
| | | | | | | +- useFileMappedBuffer=true
| | | | | | | +- maxCachedFiles=2048
| | | | | | +- [/]=>default
| | | | | | += jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true - STARTED
| | | | | | | +- logVerbosityLevel=DEBUG
| | | | | | | +- fork=false
| | | | | | | +- com.sun.appserv.jsp.classpath=/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar:/home/user/jetty-distribution-{VERSION}/resources:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/start.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/opt/local/lib/libsvnjavahl-1.0.dylib:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/libAppleScriptEngine.jnilib:/System/Library/Java/Extensions/libJ3D.jnilib:/System/Library/Java/Extensions/libJ3DAudio.jnilib:/System/Library/Java/Extensions/libJ3DUtils.jnilib:/System/Library/Java/Extensions/libmlib_jai.jnilib:/System/Library/Java/Extensions/libQTJNative.jnilib:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/usr/lib/java/libjdns_sd.jnilib
| | | | | | | +- scratchdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/jsp
| | | | | | | +- xpoweredBy=false
| | | | | | +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | | | | += QoSFilter - STARTED
| | | | | | | +- managedAttr=true
| | | | | | | +- maxRequests=10000
| | | | | | +- [/*]/[]==0=>QoSFilter
| | | | | | += MultiPart - STARTED
| | | | | | | +- deleteFiles=true
| | | | | | +- [/dump/*]/[]==0=>MultiPart
| | | | | | += GzipFilter - STARTED
| | | | | | | +- bufferSize=8192
| | | | | | | +- excludedAgents=MSIE 6.0
| | | | | | | +- userAgent=(?:Mozilla[^\(]*\(compatible;\s*+([^;]*);.*)|(?:.*?([^\s]+/[^\s]+).*)
| | | | | | | +- mimeTypes=text/plain,application/xml
| | | | | | | +- uncheckedPrintWriter=true
| | | | | | | +- cacheSize=1024
| | | | | | | +- minGzipSize=2048
| | | | | | +- [/dump/gzip/*, *.txt]/[]==0=>GzipFilter
| | | | | | += Login@462ff49==com.acme.LoginServlet,1,true - STARTED
| | | | | | +- [/login/*]=>Login
| | | | | | += Hello@42628b2==com.acme.HelloWorld,1,true - STARTED
| | | | | | +- [/hello/*]=>Hello
| | | | | | += Dump@20ae14==com.acme.Dump,1,true - STARTED
| | | | | | | +- servlet-override-example=a servlet value
| | | | | | +- [/dump/*, *.dump]=>Dump
| | | | | | += Session@d9891a76==com.acme.SessionDump,5,true - STARTED
| | | | | | +- [/session/*]=>Session
| | | | | | += Cookie@78a4f684==com.acme.CookieDump,1,true - STARTED
| | | | | | +- [/cookie/*]=>Cookie
| | | | | | += Dispatch@14d3a89a==com.acme.DispatchServlet,1,true - STARTED
| | | | | | +- [/dispatch/*]=>Dispatch
| | | | | | += CGI@10465==org.eclipse.jetty.servlets.CGI,1,true - STARTED
| | | | | | +- [/cgi-bin/*]=>CGI
| | | | | | += Chat@200778==com.acme.ChatServlet,1,true - STARTED
| | | | | | +- [/chat/*]=>Chat
| | | | | | += WSChat@99274454==com.acme.WebSocketChatServlet,1,true - STARTED
| | | | | | +- [/ws/*]=>WSChat
| | | | | | += Rewrite@a4dac96c==com.acme.RewriteServlet,-1,false - STARTED
| | | | | | +- [/rewritten/*, /redirected/*]=>Rewrite
| | | | | | += SecureMode@d45951da==com.acme.SecureModeServlet,1,true - STARTED
| | | | | | +- [/secureMode/*]=>SecureMode
| | | | | | += foo.jsp@d7583f1f==org.apache.jasper.servlet.JspServlet,-1,false - STARTED
| | | | | | +- [/jsp/foo/]=>foo.jsp
| | | | | | +- [*.more]=>Dump
| | | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | | += RegoTest@dafcd1ad==com.acme.RegTest,-1,false - STARTED
| | | | | | +- [/rego/*]=>RegoTest
| | | | | | += RegoTest2@849d6425==com.acme.RegTest,-1,false - STARTED
| | | | | | +- [/rego2/*]=>RegoTest2
| | | | | | += TestFilter - STARTED
| | | | | | | +- remote=false
| | | | | | +- [/*]/[]==31=>TestFilter
| | | | | += HashLoginService[Test Realm] - STARTED
| | | | | +- org.eclipse.jetty.security.authentication.FormAuthenticator@1fa291f2
| | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | | +- org.eclipse.jetty.security.DefaultIdentityService@41917d6d
| | | | | |
| | | | | +> HashLoginService[Test Realm] - STARTED
| | | | | +> org.eclipse.jetty.security.DefaultIdentityService@41917d6d
| | | | | +> org.eclipse.jetty.security.authentication.FormAuthenticator@1fa291f2
| | | | | +> [server-administrator, *, admin, user]
| | | | | +> /rego2/*={*={RoleInfo,C[server-administrator]}}
| | | | | +> *.htm={*={RoleInfo,C[server-administrator, *, admin, user]}}
| | | | | +> /dump/auth/ssl/*={*={RoleInfo[]}}
| | | | | +> /dump/auth/noaccess/*={*={RoleInfo,F,C[]}}
| | | | | +> /auth/*={*={RoleInfo,F,C[]}}
| | | | | +> /dump/auth/admin/*={*={RoleInfo,C[admin]}}
| | | | | +> /dump/auth/relax/*={GET={RoleInfo[]}, HEAD={RoleInfo[]}}
| | | | | +> /rego/*={*={RoleInfo,C[admin]}}
| | | | | +> /dump/auth/*={*={RoleInfo,C[server-administrator, *, admin, user]}}
| | | | | +> /={TRACE={RoleInfo,F,C[]}}
| | | | | +> /auth/relax.txt={GET={RoleInfo[]}, HEAD={RoleInfo[]}}
| | | | | +> /auth2/*={*={RoleInfo,C[server-administrator, *, admin, user]}}
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | += org.eclipse.jetty.servlet.ErrorPageErrorHandler@24bf7a86 - STARTED
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | +- org.eclipse.jetty.servlets.QoSFilter@6df3d1f5
| | | |
| | | +> WebAppClassLoader=Test WebApp@3e2f3adb
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/classes/
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-continuation-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-servlets-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/websocket-api-9.0.2.v20130417.jar
| | | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/websocket-servlet-9.0.2.v20130417.jar
| | | | +- startJarLoader@7194b34a
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/resources/
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar
| | | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar
| | | | +- sun.misc.Launcher$AppClassLoader@19d1b44b
| | | | +- file:/home/user/jetty-distribution-{VERSION}/start.jar
| | | | +- sun.misc.Launcher$ExtClassLoader@1693b52b
| | | +> org.eclipse.jetty.server.context.ManagedAttributes=QoSFilter,TransparentProxy.ThreadPool,TransparentProxy.HttpClient
| | | +> context-override-example=a context value
| | | +> javax.servlet.context.tempdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-
| | | +> org.apache.catalina.jsp_classpath=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/classes:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-continuation-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-servlets-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/websocket-api-9.0.2.v20130417.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/WEB-INF/lib/websocket-servlet-9.0.2.v20130417.jar
| | | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | | +> QoSFilter=org.eclipse.jetty.servlets.QoSFilter@6df3d1f5
| | | +> com.sun.jsp.taglibraryCache={}
| | | +> com.sun.jsp.tagFileJarUrlsCache={}
| | += o.e.j.w.WebAppContext@4ac92718{/proxy,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/,AVAILABLE}{/xref-proxy.war} - STARTED
| | += org.eclipse.jetty.server.session.SessionHandler@5c25bf03 - STARTED
| | | += org.eclipse.jetty.server.session.HashSessionManager@33053093 - STARTED
| | | += org.eclipse.jetty.security.ConstraintSecurityHandler@3bab0b5a - STARTED
| | | | +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@11ad5296
| | | | += org.eclipse.jetty.servlet.ServletHandler@a08feeb - STARTED
| | | | | += default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true - STARTED
| | | | | | +- maxCacheSize=256000000
| | | | | | +- etags=true
| | | | | | +- dirAllowed=true
| | | | | | +- gzip=true
| | | | | | +- maxCachedFileSize=200000000
| | | | | | +- redirectWelcome=false
| | | | | | +- acceptRanges=true
| | | | | | +- welcomeServlets=false
| | | | | | +- aliases=false
| | | | | | +- useFileMappedBuffer=true
| | | | | | +- maxCachedFiles=2048
| | | | | +- [/]=>default
| | | | | += jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true - STARTED
| | | | | | +- logVerbosityLevel=DEBUG
| | | | | | +- fork=false
| | | | | | +- com.sun.appserv.jsp.classpath=/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar:/home/user/jetty-distribution-{VERSION}/resources:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar:/home/user/jetty-distribution-{VERSION}/start.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/opt/local/lib/libsvnjavahl-1.0.dylib:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/libAppleScriptEngine.jnilib:/System/Library/Java/Extensions/libJ3D.jnilib:/System/Library/Java/Extensions/libJ3DAudio.jnilib:/System/Library/Java/Extensions/libJ3DUtils.jnilib:/System/Library/Java/Extensions/libmlib_jai.jnilib:/System/Library/Java/Extensions/libQTJNative.jnilib:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/usr/lib/java/libjdns_sd.jnilib
| | | | | | +- scratchdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/jsp
| | | | | | +- xpoweredBy=false
| | | | | +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp
| | | | | += XrefTransparentProxy@b0222797==org.eclipse.jetty.proxy.ProxyServlet$Transparent,1,true - STARTED
| | | | | | +- proxyTo=http://download.eclipse.org/jetty/stable-9
| | | | | | +- hostHeader=download.eclipse.org
| | | | | +- [/xref/*]=>XrefTransparentProxy
| | | | | += JavadocTransparentProxy@8ab9c012==org.eclipse.jetty.proxy.ProxyServlet$Transparent,1,true - STARTED
| | | | | | +- proxyTo=http://download.eclipse.org/jetty/stable-9
| | | | | | +- hostHeader=download.eclipse.org
| | | | | +- [/apidocs/*]=>JavadocTransparentProxy
| | | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | | | +~ HashLoginService[Test Realm] - STARTED
| | | | +- org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | +- org.eclipse.jetty.security.authentication.BasicAuthenticator@5497fb72
| | | | |
| | | | +> HashLoginService[Test Realm] - STARTED
| | | | +> org.eclipse.jetty.security.DefaultIdentityService@d2539a6
| | | | +> org.eclipse.jetty.security.authentication.BasicAuthenticator@5497fb72
| | | | +> []
| | | | +> /={TRACE={RoleInfo,F,C[]}}
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | += org.eclipse.jetty.servlet.ErrorPageErrorHandler@321f8d38 - STARTED
| | | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| | |
| | +> WebAppClassLoader=Transparent Proxy WebApp@3570713d
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/classes/
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-client-{VERSION}.jar
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-proxy-{VERSION}.jar
| | | +- file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar
| | | +- startJarLoader@7194b34a
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/resources/
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar
| | | +- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar
| | | +- sun.misc.Launcher$AppClassLoader@19d1b44b
| | | +- file:/home/user/jetty-distribution-{VERSION}/start.jar
| | | +- sun.misc.Launcher$ExtClassLoader@1693b52b
| | +> javax.servlet.context.tempdir=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-
| | +> org.apache.catalina.jsp_classpath=/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/classes:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-client-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-http-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-io-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-proxy-{VERSION}.jar:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/WEB-INF/lib/jetty-util-{VERSION}.jar
| | +> org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern=.*/servlet-api-[^/]*\.jar$
| | +> JavadocTransparentProxy.HttpClient=org.eclipse.jetty.client.HttpClient@580f016d
| | +> XrefTransparentProxy.HttpClient=org.eclipse.jetty.client.HttpClient@70c7e52b
| | +> com.sun.jsp.taglibraryCache={}
| | +> com.sun.jsp.tagFileJarUrlsCache={}
| += org.eclipse.jetty.server.handler.DefaultHandler@4de4926a - STARTED
| | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| += org.eclipse.jetty.server.handler.RequestLogHandler@3dc087a2 - STARTED
| | += org.eclipse.jetty.server.AsyncNCSARequestLog@108a1cf6 - STARTED
| | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
+- org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| +- [/rego/*]=>RegoTest=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=RegoTest,id=0
| +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@17d41d12=org.eclipse.jetty.security:context=test,type=defaultauthenticatorfactory,id=0
| +- org.eclipse.jetty.server.session.HashSessionManager@1246f8d0=org.eclipse.jetty.server.session:context=test,type=hashsessionmanager,id=0
| +- org.eclipse.jetty.security.ConstraintSecurityHandler@1890e38=org.eclipse.jetty.security:context=ROOT,type=constraintsecurityhandler,id=0
| +- WSChat@99274454==com.acme.WebSocketChatServlet,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=WSChat,id=0
| +- org.eclipse.jetty.deploy.DeploymentManager@c8e4be2=org.eclipse.jetty.deploy:type=deploymentmanager,id=0
| +- org.eclipse.jetty.jmx.MBeanContainer@644a5ddd=org.eclipse.jetty.jmx:type=mbeancontainer,id=0
| +- [/dump/gzip/*, *.txt]/[]==0=>GzipFilter=org.eclipse.jetty.servlet:context=test,type=filtermapping,name=GzipFilter,id=0
| +- Hello@42628b2==com.acme.HelloWorld,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Hello,id=0
| +- [/]=>default=org.eclipse.jetty.servlet:context=xref-proxy,type=servletmapping,name=default,id=0
| +- [/login/*]=>Login=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Login,id=0
| +- org.eclipse.jetty.server.handler.DefaultHandler@4de4926a=org.eclipse.jetty.server.handler:type=defaulthandler,id=0
| +- org.eclipse.jetty.server.session.SessionHandler@5c25bf03=org.eclipse.jetty.server.session:context=xref-proxy,type=sessionhandler,id=0
| +- [/ws/*]=>WSChat=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=WSChat,id=0
| +- o.e.j.w.WebAppContext@6f01ba6f{/,file:/home/user/jetty-distribution-{VERSION}/webapps/ROOT/,AVAILABLE}{/ROOT}=org.eclipse.jetty.webapp:context=ROOT,type=webappcontext,id=0
| +- o.e.j.w.WebAppContext@7ea88b1c{/async-rest,[file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/, jar:file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.2.v20130417.jar!/META-INF/resources/],AVAILABLE}{/async-rest.war}=org.eclipse.jetty.webapp:context=async-rest,type=webappcontext,id=0
| +- ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090}=org.eclipse.jetty.server:context=HTTP/1.1@3d0f282,type=serverconnector,id=0
| +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@6242c657=org.eclipse.jetty.security:context=ROOT,type=defaultauthenticatorfactory,id=0
| +- JavadocTransparentProxy@8ab9c012==org.eclipse.jetty.proxy.ProxyServlet$Transparent,1,true=org.eclipse.jetty.servlet:context=xref-proxy,type=servletholder,name=JavadocTransparentProxy,id=0
| +- [/dump/*, *.dump]=>Dump=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Dump,id=0
| +- [/jsp/foo/]=>foo.jsp=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=foo.jsp,id=0
| +- org.eclipse.jetty.servlet.ServletHandler@46bac287=org.eclipse.jetty.servlet:context=async-rest,type=servlethandler,id=0
| +- GzipFilter=org.eclipse.jetty.servlet:context=test,type=filterholder,name=GzipFilter,id=0
| +- o.e.j.w.WebAppContext@4ac92718{/proxy,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/,AVAILABLE}{/xref-proxy.war}=org.eclipse.jetty.webapp:context=xref-proxy,type=webappcontext,id=0
| +- qtp1062680061{STARTED,10<=13<=200,i=1,q=0}=org.eclipse.jetty.util.thread:type=queuedthreadpool,id=0
| +- org.eclipse.jetty.server.session.HashSessionManager@33053093=org.eclipse.jetty.server.session:context=xref-proxy,type=hashsessionmanager,id=0
| +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@52b12fef=org.eclipse.jetty.security:context=async-rest,type=defaultauthenticatorfactory,id=0
| +- Login@462ff49==com.acme.LoginServlet,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Login,id=0
| +- org.eclipse.jetty.security.authentication.BasicAuthenticator@7b239469=org.eclipse.jetty.security.authentication:context=async-rest,type=basicauthenticator,id=0
| +- MultiPart=org.eclipse.jetty.servlet:context=test,type=filterholder,name=MultiPart,id=0
| +- default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true=org.eclipse.jetty.servlet:context=xref-proxy,type=servletholder,name=default,id=0
| +- default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true=org.eclipse.jetty.servlet:context=ROOT,type=servletholder,name=default,id=0
| +- default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true=org.eclipse.jetty.servlet:context=async-rest,type=servletholder,name=default,id=0
| +- default@5c13d641==org.eclipse.jetty.servlet.DefaultServlet,0,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=default,id=0
| +- org.eclipse.jetty.server.session.HashSessionManager@746a95ae=org.eclipse.jetty.server.session:context=ROOT,type=hashsessionmanager,id=0
| +- RegoTest2@849d6425==com.acme.RegTest,-1,false=org.eclipse.jetty.servlet:context=test,type=servletholder,name=RegoTest2,id=0
| +- org.eclipse.jetty.server.ServerConnector$ServerConnectorManager@6f0ac4be=org.eclipse.jetty.server:context=HTTP/1.1@3d0f282,type=serverconnector$serverconnectormanager,id=0
| +- [/]=>default=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=default,id=0
| +- SecureMode@d45951da==com.acme.SecureModeServlet,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=SecureMode,id=0
| +- org.eclipse.jetty.security.authentication.BasicAuthenticator@6b733b94=org.eclipse.jetty.security.authentication:context=ROOT,type=basicauthenticator,id=0
| +- org.eclipse.jetty.server.session.SessionHandler@6dfb8d2e=org.eclipse.jetty.server.session:context=async-rest,type=sessionhandler,id=0
| +- org.eclipse.jetty.security.DefaultIdentityService@41917d6d=org.eclipse.jetty.security:context=test,type=defaultidentityservice,id=0
| +- jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true=org.eclipse.jetty.servlet:context=xref-proxy,type=servletholder,name=jsp,id=0
| +- jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true=org.eclipse.jetty.servlet:context=ROOT,type=servletholder,name=jsp,id=0
| +- jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true=org.eclipse.jetty.servlet:context=async-rest,type=servletholder,name=jsp,id=0
| +- jsp@19c47==org.apache.jasper.servlet.JspServlet,0,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=jsp,id=0
| +- [/*]/[]==31=>TestFilter=org.eclipse.jetty.servlet:context=test,type=filtermapping,name=TestFilter,id=0
| +- org.eclipse.jetty.server.session.HashSessionManager@6cb83869=org.eclipse.jetty.server.session:context=async-rest,type=hashsessionmanager,id=0
| +- org.eclipse.jetty.io.ArrayByteBufferPool@30ad8942=org.eclipse.jetty.io:context=HTTP/1.1@3d0f282,type=arraybytebufferpool,id=0
| +- [/cgi-bin/*]=>CGI=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=CGI,id=0
| +- org.eclipse.jetty.server.handler.HandlerCollection@58b37561=org.eclipse.jetty.server.handler:type=handlercollection,id=0
| +- Session@d9891a76==com.acme.SessionDump,5,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Session,id=0
| +- org.eclipse.jetty.servlet.ServletHandler@a08feeb=org.eclipse.jetty.servlet:context=xref-proxy,type=servlethandler,id=0
| +- org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@725f5=org.eclipse.jetty.util.thread:type=scheduledexecutorscheduler,id=0
| +- [/*]/[]==0=>QoSFilter=org.eclipse.jetty.servlet:context=test,type=filtermapping,name=QoSFilter,id=0
| +- org.eclipse.jetty.server.session.SessionHandler@5a770658=org.eclipse.jetty.server.session:context=ROOT,type=sessionhandler,id=0
| +- org.eclipse.jetty.server.session.SessionHandler@336abd81=org.eclipse.jetty.server.session:context=test,type=sessionhandler,id=0
| +- o.e.j.s.h.ContextHandler@7b2dffdf{/javadoc,file:/home/user/jetty-distribution-{VERSION}/javadoc,AVAILABLE}=org.eclipse.jetty.server.handler:context=javadoc,type=contexthandler,id=0
| +- org.eclipse.jetty.servlets.QoSFilter@6df3d1f5=org.eclipse.jetty.servlets:context=test,type=qosfilter,id=0
| +- [*.more]=>Dump=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Dump,id=1
| +- Dump@20ae14==com.acme.Dump,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Dump,id=0
| +- HttpConnectionFactory@5e47b1b9{HTTP/1.1}=org.eclipse.jetty.server:context=HTTP/1.1@3d0f282,type=httpconnectionfactory,id=0
| +- org.eclipse.jetty.servlet.ServletHandler@debac27=org.eclipse.jetty.servlet:context=ROOT,type=servlethandler,id=0
| +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp=org.eclipse.jetty.servlet:context=xref-proxy,type=servletmapping,name=jsp,id=0
| +- org.eclipse.jetty.server.handler.MovedContextHandler$Redirector@2a4200d3=org.eclipse.jetty.server.handler:context=oldContextPath,type=movedcontexthandler$redirector,id=0
| +- TestFilter=org.eclipse.jetty.servlet:context=test,type=filterholder,name=TestFilter,id=0
| +- Rewrite@a4dac96c==com.acme.RewriteServlet,-1,false=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Rewrite,id=0
| +- [/dispatch/*]=>Dispatch=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Dispatch,id=0
| +- [/testSerial]=>SerialRestServlet=org.eclipse.jetty.servlet:context=async-rest,type=servletmapping,name=SerialRestServlet,id=0
| +- org.eclipse.jetty.servlet.ErrorPageErrorHandler@24bf7a86=org.eclipse.jetty.servlet:context=test,type=errorpageerrorhandler,id=0
| +- [/secureMode/*]=>SecureMode=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=SecureMode,id=0
| +- [/]=>default=org.eclipse.jetty.servlet:context=async-rest,type=servletmapping,name=default,id=0
| +- Dispatch@14d3a89a==com.acme.DispatchServlet,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Dispatch,id=0
| +- org.eclipse.jetty.server.handler.ContextHandlerCollection@64c6e290=org.eclipse.jetty.server.handler:type=contexthandlercollection,id=0
| +- org.eclipse.jetty.security.ConstraintSecurityHandler@2848c90e=org.eclipse.jetty.security:context=async-rest,type=constraintsecurityhandler,id=0
| +- [/rego2/*]=>RegoTest2=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=RegoTest2,id=0
| +- [/rewritten/*, /redirected/*]=>Rewrite=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Rewrite,id=0
| +- org.eclipse.jetty.servlet.ServletHandler@5034037e=org.eclipse.jetty.servlet:context=test,type=servlethandler,id=0
| +- org.eclipse.jetty.servlet.ErrorPageErrorHandler@3c121009=org.eclipse.jetty.servlet:context=async-rest,type=errorpageerrorhandler,id=0
| +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:9090]=sun.nio.ch:context=HTTP/1.1@3d0f282,type=serversocketchannelimpl,id=0
| +- org.eclipse.jetty.security.ConstraintSecurityHandler@7179290f=org.eclipse.jetty.security:context=test,type=constraintsecurityhandler,id=0
| +- org.eclipse.jetty.server.session.HashSessionIdManager@289eb857=org.eclipse.jetty.server.session:type=hashsessionidmanager,id=0
| +- org.eclipse.jetty.security.authentication.BasicAuthenticator@5497fb72=org.eclipse.jetty.security.authentication:context=xref-proxy,type=basicauthenticator,id=0
| +- org.eclipse.jetty.security.DefaultAuthenticatorFactory@11ad5296=org.eclipse.jetty.security:context=xref-proxy,type=defaultauthenticatorfactory,id=0
| +- [/dump/*]/[]==0=>MultiPart=org.eclipse.jetty.servlet:context=test,type=filtermapping,name=MultiPart,id=0
| +- o.e.j.s.h.MovedContextHandler@5e0c8d24{/oldContextPath,null,AVAILABLE}=org.eclipse.jetty.server.handler:context=oldContextPath,type=movedcontexthandler,id=0
| +- QoSFilter=org.eclipse.jetty.servlet:context=test,type=filterholder,name=QoSFilter,id=0
| +- org.eclipse.jetty.security.authentication.FormAuthenticator@1fa291f2=org.eclipse.jetty.security.authentication:context=test,type=formauthenticator,id=0
| +- o.e.j.w.WebAppContext@716d9094{/test,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/,AVAILABLE}{/test.war}=org.eclipse.jetty.webapp:context=test,type=webappcontext,id=0
| +- [/]=>default=org.eclipse.jetty.servlet:context=ROOT,type=servletmapping,name=default,id=0
| +- [/hello/*]=>Hello=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Hello,id=0
| +- [/chat/*]=>Chat=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Chat,id=0
| +- [/testAsync]=>AsyncRestServlet=org.eclipse.jetty.servlet:context=async-rest,type=servletmapping,name=AsyncRestServlet,id=0
| +- org.eclipse.jetty.security.DefaultIdentityService@d2539a6=org.eclipse.jetty.security:context=async-rest,type=defaultidentityservice,id=0
| +- org.eclipse.jetty.server.handler.RequestLogHandler@3dc087a2=org.eclipse.jetty.server.handler:type=requestloghandler,id=0
| +- org.eclipse.jetty.servlet.ErrorPageErrorHandler@321f8d38=org.eclipse.jetty.servlet:context=xref-proxy,type=errorpageerrorhandler,id=0
| +- org.eclipse.jetty.server.handler.ResourceHandler@8f9c8a7=org.eclipse.jetty.server.handler:context=javadoc,type=resourcehandler,id=0
| +- CGI@10465==org.eclipse.jetty.servlets.CGI,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=CGI,id=0
| +- SerialRestServlet@461411d==org.eclipse.jetty.example.asyncrest.SerialRestServlet,-1,false=org.eclipse.jetty.servlet:context=async-rest,type=servletholder,name=SerialRestServlet,id=0
| +- HashLoginService[Test Realm]=org.eclipse.jetty.security:type=hashloginservice,id=0
| +- AsyncRestServlet@73eb9bd5==org.eclipse.jetty.example.asyncrest.AsyncRestServlet,-1,false=org.eclipse.jetty.servlet:context=async-rest,type=servletholder,name=AsyncRestServlet,id=0
| +- org.eclipse.jetty.server.Server@76f08fe1=org.eclipse.jetty.server:type=server,id=0
| +- org.eclipse.jetty.servlet.ErrorPageErrorHandler@3c41a9ce=org.eclipse.jetty.servlet:context=ROOT,type=errorpageerrorhandler,id=0
| +- [/apidocs/*]=>JavadocTransparentProxy=org.eclipse.jetty.servlet:context=xref-proxy,type=servletmapping,name=JavadocTransparentProxy,id=0
| +- Chat@200778==com.acme.ChatServlet,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Chat,id=0
| +- [/cookie/*]=>Cookie=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Cookie,id=0
| +- [/session/*]=>Session=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=Session,id=0
| +- org.eclipse.jetty.deploy.providers.WebAppProvider@7b26b7df=org.eclipse.jetty.deploy.providers:type=webappprovider,id=0
| +- org.eclipse.jetty.server.AsyncNCSARequestLog@108a1cf6=org.eclipse.jetty.server:type=asyncncsarequestlog,id=0
| +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp=org.eclipse.jetty.servlet:context=test,type=servletmapping,name=jsp,id=0
| +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp=org.eclipse.jetty.servlet:context=ROOT,type=servletmapping,name=jsp,id=0
| +- HashLoginService[Test Realm]=org.eclipse.jetty.security:context=test,type=hashloginservice,id=0
| +- [*.jsp, *.jspf, *.jspx, *.xsp, *.JSP, *.JSPF, *.JSPX, *.XSP]=>jsp=org.eclipse.jetty.servlet:context=async-rest,type=servletmapping,name=jsp,id=0
| +- foo.jsp@d7583f1f==org.apache.jasper.servlet.JspServlet,-1,false=org.eclipse.jetty.servlet:context=test,type=servletholder,name=foo.jsp,id=0
| +- RegoTest@dafcd1ad==com.acme.RegTest,-1,false=org.eclipse.jetty.servlet:context=test,type=servletholder,name=RegoTest,id=0
| +- [/xref/*]=>XrefTransparentProxy=org.eclipse.jetty.servlet:context=xref-proxy,type=servletmapping,name=XrefTransparentProxy,id=0
| +- org.eclipse.jetty.security.ConstraintSecurityHandler@3bab0b5a=org.eclipse.jetty.security:context=xref-proxy,type=constraintsecurityhandler,id=0
| +- HttpConfiguration@703b16bb{32768,8192/8192,https://:8443,[]}=org.eclipse.jetty.server:context=HTTP/1.1@3d0f282,type=httpconfiguration,id=0
| +- org.eclipse.jetty.util.log.Log@dda4f7b=org.eclipse.jetty.util.log:type=log,id=0
| +- Cookie@78a4f684==com.acme.CookieDump,1,true=org.eclipse.jetty.servlet:context=test,type=servletholder,name=Cookie,id=0
| +- XrefTransparentProxy@b0222797==org.eclipse.jetty.proxy.ProxyServlet$Transparent,1,true=org.eclipse.jetty.servlet:context=xref-proxy,type=servletholder,name=XrefTransparentProxy,id=0
+- org.eclipse.jetty.util.log.Log@dda4f7b
+= ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090} - STARTED
| +~ org.eclipse.jetty.server.Server@76f08fe1 - STARTING
| +~ qtp1062680061{STARTED,10<=13<=200,i=1,q=0} - STARTED
| +~ org.eclipse.jetty.util.thread.ScheduledExecutorScheduler@725f5 - STARTED
| +- org.eclipse.jetty.io.ArrayByteBufferPool@30ad8942
| += HttpConnectionFactory@5e47b1b9{HTTP/1.1} - STARTED
| | +- HttpConfiguration@703b16bb{32768,8192/8192,https://:8443,[]}
| | +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| += org.eclipse.jetty.server.ServerConnector$ServerConnectorManager@6f0ac4be - STARTED
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@61454787 keys=0 selected=0 id=0
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@a0c508b keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@2e7bdad4 keys=0 selected=0 id=1
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@5825168 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@2eae85ab keys=0 selected=0 id=2
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@6faa85f6 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@244112c0 keys=0 selected=0 id=3
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@10c6f695 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@7666b8cd keys=0 selected=0 id=4
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@17836c59 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@353e531e keys=0 selected=0 id=5
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@2095f259 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@5459c1c5 keys=0 selected=0 id=6
| | | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | | +- sun.nio.ch.KQueueSelectorImpl@142c7195 keys=0
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector@71d4f78b keys=0 selected=0 id=7
| | +- org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:459)
| | +- sun.nio.ch.KQueueSelectorImpl@16bdab45 keys=0
| +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
| +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:9090]
+= org.eclipse.jetty.deploy.DeploymentManager@c8e4be2 - STARTED
| +~ org.eclipse.jetty.deploy.providers.WebAppProvider@7b26b7df - STARTED
| +~ org.eclipse.jetty.jmx.MBeanContainer@644a5ddd
+~ HashLoginService[Test Realm] - STARTED
+= org.eclipse.jetty.server.session.HashSessionIdManager@289eb857 - STARTED
|
+> startJarLoader@7194b34a
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-xml-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/servlet-api-3.0.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-http-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-continuation-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-server-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-security-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-servlet-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-webapp-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-deploy-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-client-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-jmx-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/com.sun.el-2.2.0.v201303151357.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.el-2.2.0.v201303151357.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jsp/org.eclipse.jdt.core-3.8.2.v20130121.jar
+- file:/home/user/jetty-distribution-{VERSION}/resources/
+- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-api-9.0.2.v20130417.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-common-9.0.2.v20130417.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-server-9.0.2.v20130417.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/websocket/websocket-servlet-9.0.2.v20130417.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-util-{VERSION}.jar
+- file:/home/user/jetty-distribution-{VERSION}/lib/jetty-io-{VERSION}.jar
+- sun.misc.Launcher$AppClassLoader@19d1b44b
+- file:/home/user/jetty-distribution-{VERSION}/start.jar
+- sun.misc.Launcher$ExtClassLoader@1693b52b
2013-04-29 14:38:39.422:INFO:oejs.Server:Thread-2: Graceful shutdown org.eclipse.jetty.server.Server@76f08fe1 by Mon Apr 29 14:38:44 CDT 2013
2013-04-29 14:38:39.429:INFO:oejs.ServerConnector:Thread-2: Stopped ServerConnector@3d0f282{HTTP/1.1}{0.0.0.0:9090}
2013-04-29 14:38:39.444:INFO:oejsl.ELContextCleaner:Thread-2: javax.el.BeanELResolver purged
2013-04-29 14:38:39.444:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.w.WebAppContext@4ac92718{/proxy,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-xref-proxy.war-_xref-proxy-any-/webapp/,UNAVAILABLE}{/xref-proxy.war}
2013-04-29 14:38:39.447:INFO:oejsl.ELContextCleaner:Thread-2: javax.el.BeanELResolver purged
2013-04-29 14:38:39.447:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.w.WebAppContext@716d9094{/test,file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-test.war-_test-any-/webapp/,UNAVAILABLE}{/test.war}
2013-04-29 14:38:39.455:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.s.h.ContextHandler@7b2dffdf{/javadoc,file:/home/user/jetty-distribution-{VERSION}/javadoc,UNAVAILABLE}
2013-04-29 14:38:39.456:INFO:oejsl.ELContextCleaner:Thread-2: javax.el.BeanELResolver purged
2013-04-29 14:38:39.456:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.w.WebAppContext@6f01ba6f{/,file:/home/user/jetty-distribution-{VERSION}/webapps/ROOT/,UNAVAILABLE}{/ROOT}
2013-04-29 14:38:39.456:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.s.h.MovedContextHandler@5e0c8d24{/oldContextPath,null,UNAVAILABLE}
2013-04-29 14:38:39.457:INFO:oejsl.ELContextCleaner:Thread-2: javax.el.BeanELResolver purged
2013-04-29 14:38:39.457:INFO:oejsh.ContextHandler:Thread-2: stopped o.e.j.w.WebAppContext@7ea88b1c{/async-rest,[file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/, jar:file:/private/var/folders/br/kbs2g3753c54wmv4j31pnw5r0000gn/T/jetty-0.0.0.0-9090-async-rest.war-_async-rest-any-/webapp/WEB-INF/lib/example-async-rest-jar-9.0.2.v20130417.jar!/META-INF/resources/],UNAVAILABLE}{/async-rest.war}
....

View File

@ -0,0 +1,189 @@
//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
// ========================================================================
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
[[jetty-server-dump]]
=== Jetty Server Dump
The dump feature in Jetty provides a snapshot of the bean containment tree of the main Jetty components together with a summary of their configuration. This includes threadpool, connectors, contexts, webapplications, servlets and so forth.
[[configuring-dump-feature]]
==== Configuring the Jetty Server Dump
You can request that Jetty do a dump immediately after starting and just before stopping by calling the appropriate setters on the `Server` instance.
For embedded usage this can be used by calling the setters directly.
```java
server.setDumpAfterStart(true);
server.setDumpBeforeStop(true);
```
Standalone Jetty uses two properties to control this behaviour which are referenced in `jetty.xml` to call these setters.
These properties are `jetty.server.dumpAfterStart` and `jetty.server.dumpBeforeStop`.
These can be temporarily enabled by supplying these properties as command line arguments,
or they can be enabled via the `server.ini` file (see xref:quick-start-configure[]).
```
java -jar $JETTY_HOME/start.jar jetty.server.dumpAfterStart=true jetty.server.dumpBeforeStop=true
```
[[extra-threadpool-info]]
==== Extra ThreadPool Information
To get maximum detail from the `QueuedThreadPool` in the dump, you need to `setDetailDump(true)` on any instances of `QueuedThreadPool` you are using.
This extra detail in the detailed dump consists of full stack traces for every running thread, and a list of queued jobs waiting to be run.
For embedded usage this can be used by calling the setters directly.
```java
threadPool.setDetailedDump(true);
```
For standalone jetty you can enable the `threadpool` module and configure the `jetty.threadPool.detailedDump` property.
See xref:startup-modules[] for information on how to enable a module.
This same property can also be set via the command line the same as the server dump property.
[[dump-tool-via-jmx]]
==== Using the Dump Feature via JMX
The `dump` method is on the Server instance and many of its nested components (Handlers, Connectors, and so forth).
Dumps may be obtained by calling these methods either in code or via JMX (see xref:using-jmx[]).
The Server MBean has a `dump()` method, which dumps everything, plus a `dumpStdErr()` operation that dumps to StdErr rather than replying to JConsole.
[[examing-jetty-distro-dump]]
==== Explanation of the Dump Key
- `+- bean` is a java POJO that is contained by the parent object as a bean added with the addBean method.
- `+= managed` is a bean that is also a LifeCycle that is started and stopped with the parent object.
- `+~ unmanaged` is a bean that is also a LifeCycle that is started and stopped with the parent object. It is typically shared with other objects (hence its children are not dumped).
- `+? auto` is a bean that has been added to an unstarted parent. If it is a LifeCycle that is not started when the parent is started, then it is started and becomes a managed bean, otherwise it becomes either unmanaged or just a bean.
- `+: iterable` is an object that is contained within an iterable field of the parent (eg a list, set etc).
- `+] array` is an object that is contained within an array field of the parent.
- `+@ map` is an object that is contained within an map field of the parent.
- `+> undefined` is an object that is contained within the parent by an undefined relationship.
==== Jetty Server Dump Example
This is a dump of the OneServletContext embedded example with extra threadpool information:
....
Server@59906517{STARTED}[9.4.32-SNAPSHOT] - STARTED
+= QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}] - STARTED
| += ReservedThreadExecutor@77e4c80f{s=0/4,p=0} - STARTED
| +> threads size=8
| | +> 12 qtp1740189450-12 SELECTING RUNNABLE 5
| | +> 14 qtp1740189450-14-acceptor-0@4c78251c-ServerConnector@76707e36{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} ACCEPTING RUNNABLE 3
| | +> 16 qtp1740189450-16 IDLE TIMED_WAITING 5
| | +> 18 qtp1740189450-18 IDLE TIMED_WAITING 5
| | +> 15 qtp1740189450-15 SELECTING RUNNABLE 5
| | +> 19 qtp1740189450-19 IDLE TIMED_WAITING 5
| | +> 17 qtp1740189450-17 IDLE TIMED_WAITING 5
| | +> 13 qtp1740189450-13 IDLE TIMED_WAITING 5
| +> jobs size=0
+= ServerConnector@76707e36{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} - STARTED
| +~ Server@59906517{STARTED}[9.4.32-SNAPSHOT] - STARTED
| +~ QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}] - STARTED
| += ScheduledExecutorScheduler@7fe8ea47{STARTED} - STARTED
| +- org.eclipse.jetty.io.ArrayByteBufferPool@226a82c4
| += HttpConnectionFactory@711f39f9[HTTP/1.1] - STARTED
| | +- HttpConfiguration@731f8236{32768/8192,8192/8192,https://:0,[]}
| | +> customizers size=0
| | +> formEncodedMethods size=2
| | | +> POST
| | | +> PUT
| | +> outputBufferSize=32768
| | +> outputAggregationSize=8192
| | +> requestHeaderSize=8192
| | +> responseHeaderSize=8192
| | +> headerCacheSize=1024
| | +> secureScheme=https
| | +> securePort=0
| | +> idleTimeout=-1
| | +> blockingTimeout=-1
| | +> sendDateHeader=true
| | +> sendServerVersion=true
| | +> sendXPoweredBy=false
| | +> delayDispatchUntilContent=true
| | +> persistentConnectionsEnabled=true
| | +> maxErrorDispatches=10
| | +> minRequestDataRate=0
| | +> minResponseDataRate=0
| | +> cookieCompliance=RFC6265
| | +> setRequestCookieCompliance=RFC6265
| | +> notifyRemoteAsyncErrors=true
| | +> relativeRedirectAllowed=false
| += SelectorManager@ServerConnector@76707e36{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} - STARTED
| | += ManagedSelector@564718df{STARTED} id=0 keys=0 selected=0 updates=0 - STARTED
| | | += EatWhatYouKill@51b7e5df/SelectorProducer@18a70f16/PRODUCING/p=false/QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}][pc=0,pic=0,pec=0,epc=0]@2020-08-26T08:51:02.711784+10:00 - STARTED
| | | | +- SelectorProducer@18a70f16
| | | | +~ QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}] - STARTED
| | | +> updates @ 2020-08-26T08:51:02.705944+10:00 size=0
| | | +> keys @ 2020-08-26T08:51:02.706914+10:00 size=0
| | += ManagedSelector@62e136d3{STARTED} id=1 keys=0 selected=0 updates=0 - STARTED
| | += EatWhatYouKill@c8e4bb0/SelectorProducer@6279cee3/PRODUCING/p=false/QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}][pc=0,pic=0,pec=0,epc=0]@2020-08-26T08:51:02.717119+10:00 - STARTED
| | | +- SelectorProducer@6279cee3
| | | +~ QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}] - STARTED
| | +> updates @ 2020-08-26T08:51:02.715887+10:00 size=0
| | +> keys @ 2020-08-26T08:51:02.716158+10:00 size=0
| +- sun.nio.ch.ServerSocketChannelImpl[/0:0:0:0:0:0:0:0:8080]
| +- qtp1740189450-14-acceptor-0@4c78251c-ServerConnector@76707e36{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
+= AttributeContainerMap@4206a205{size=0} - STARTED
+= o.e.j.s.ServletContextHandler@4ba2ca36{/,file:///tmp/,AVAILABLE} - STARTED
| += org.eclipse.jetty.server.session.SessionHandler2007331442==dftMaxIdleSec=-1 - STARTED
| | += ServletHandler@29ba4338{STARTED} - STARTED
| | | +> listeners ServletHandler@29ba4338{STARTED} size=2
| | | | +> ListenerHolder@57175e74{STARTED}: org.eclipse.jetty.embedded.OneServletContext$InitListener - STARTED
| | | | +> ListenerHolder@7bb58ca3{STARTED}: org.eclipse.jetty.embedded.OneServletContext$RequestListener - STARTED
| | | +> filters ServletHandler@29ba4338{STARTED} size=2
| | | | +> org.eclipse.jetty.embedded.OneServletContext$TestFilter-29b5cd00@29b5cd00==org.eclipse.jetty.embedded.OneServletContext$TestFilter,inst=true,async=true - STARTED
| | | | | +> org.eclipse.jetty.embedded.OneServletContext$TestFilter@c540f5a
| | | | +> org.eclipse.jetty.embedded.OneServletContext$TestFilter-7113b13f@7113b13f==org.eclipse.jetty.embedded.OneServletContext$TestFilter,inst=true,async=true - STARTED
| | | | +> org.eclipse.jetty.embedded.OneServletContext$TestFilter@770c2e6b
| | | +> filterMappings ServletHandler@29ba4338{STARTED} size=2
| | | | +> [/test/*]/[]/[REQUEST]=>org.eclipse.jetty.embedded.OneServletContext$TestFilter-29b5cd00
| | | | +> [*.test]/[]/[REQUEST, ASYNC]=>org.eclipse.jetty.embedded.OneServletContext$TestFilter-7113b13f
| | | +> servlets ServletHandler@29ba4338{STARTED} size=3
| | | | +> org.eclipse.jetty.embedded.HelloServlet-6b57696f@99887e98==org.eclipse.jetty.embedded.HelloServlet,jsp=null,order=-1,inst=false,async=true - STARTED
| | | | | +> class org.eclipse.jetty.embedded.HelloServlet
| | | | +> debug@5b09653==org.eclipse.jetty.embedded.DumpServlet,jsp=null,order=-1,inst=false,async=true - STARTED
| | | | | +> class org.eclipse.jetty.embedded.DumpServlet
| | | | +> org.eclipse.jetty.servlet.DefaultServlet-38bc8ab5@f1bd2681==org.eclipse.jetty.servlet.DefaultServlet,jsp=null,order=-1,inst=false,async=true - STARTED
| | | | +> class org.eclipse.jetty.servlet.DefaultServlet
| | | +> servletMappings ServletHandler@29ba4338{STARTED} size=4
| | | +> [/hello/*]=>org.eclipse.jetty.embedded.HelloServlet-6b57696f
| | | +> [/dump/*]=>debug
| | | +> [*.dump]=>debug
| | | +> [/]=>org.eclipse.jetty.servlet.DefaultServlet-38bc8ab5
| | += org.eclipse.jetty.server.session.DefaultSessionCache@6328d34a[evict=-1,removeUnloadable=false,saveOnCreate=false,saveOnInactiveEvict=false] - STARTED
| | | += org.eclipse.jetty.server.session.NullSessionDataStore@145eaa29[passivating=false,graceSec=3600] - STARTED
| | +~ DefaultSessionIdManager@15bb6bea{STARTED}[worker=node0] - STARTED
| +> No ClassLoader
| +> eventListeners o.e.j.s.ServletContextHandler@4ba2ca36{/,file:///tmp/,AVAILABLE} size=2
| | +> org.eclipse.jetty.embedded.OneServletContext$InitListener@8b96fde
| | +> org.eclipse.jetty.embedded.OneServletContext$RequestListener@2d2e5f00
| +> handler attributes o.e.j.s.ServletContextHandler@4ba2ca36{/,file:///tmp/,AVAILABLE} size=1
| | +> org.eclipse.jetty.server.Executor=QueuedThreadPool[qtp1740189450]@67b92f0a{STARTED,8<=8<=200,i=5,r=4,q=0}[ReservedThreadExecutor@77e4c80f{s=0/4,p=0}]
| +> context attributes o.e.j.s.ServletContextHandler@4ba2ca36{/,file:///tmp/,AVAILABLE} size=2
| | +> org.eclipse.jetty.util.DecoratedObjectFactory=org.eclipse.jetty.util.DecoratedObjectFactory[decorators=1]
| | +> X-Init=true
| +> initparams o.e.j.s.ServletContextHandler@4ba2ca36{/,file:///tmp/,AVAILABLE} size=0
+= ErrorHandler@2ea6137{STARTED} - STARTED
+= DefaultSessionIdManager@15bb6bea{STARTED}[worker=node0] - STARTED
| += HouseKeeper@3439f68d{STARTED}[interval=660000, ownscheduler=true] - STARTED
+> jdk.internal.loader.ClassLoaders$AppClassLoader@2c13da15
+> jdk.internal.loader.ClassLoaders$PlatformClassLoader@41ee392b
key: +- bean, += managed, +~ unmanaged, +? auto, +: iterable, +] array, +@ map, +> undefined
....

View File

@ -65,7 +65,7 @@ When executed `start.jar` performs the following actions:
3. Uses default behavior of `java.io.File` (Relative to `System.getProperty` ("user.dir") and then as absolute file system path).
* Loads any dependent modules (merges XXNK, library, and properties results with active command line).
* Builds out server classpath.
* Determines run mode:
* Determines run mode as one of:
** Shows informational command line options and exit.
** Executes Jetty normally, waits for Jetty to stop.
** Executes a forked JVM to run Jetty in, waits for forked JVM to exit.
@ -89,9 +89,36 @@ Lists the resolved configuration that will start Jetty.
* Server classpath
* Server XML configuration files
--dry-run::
Prints the resolved command line that `start.jar` should use to start a forked instance of Jetty.
Print the command line that the start.jar generates, then exit. This may be used to generate command lines when the start.ini includes -X or -D arguments:
....
$ java -jar start.jar --dry-run > jetty.sh
$ . jetty.sh
....
--dry-run=<parts>::
Print specific parts of the command line. The parts are a comma separated list of:
* "java" - the JVM to run
* "opts" - the JVM options (eg -D and -X flags)
* "path" - the JVM class path or JPMS modules options
* "main" - the main class to run
* "args" - the arguments passed to the main class
It is possible to decompose the start command:
....
$ OPTS=$(java -jar start.jar --dry-run=opts,path)
$ MAIN=$(java -jar start.jar --dry-run=main)
$ ARGS=$(java -jar start.jar --dry-run=args)
$ java $OPTS -Dextra=opt $MAIN $ARGS extra=arg
....
Alternatively to create an args file for java:
....
$ java -jar start.jar --dry-run=opts,path,main,args > /tmp/args
$ java @/tmp/args
....
--exec::
Starts a forked instance of Jetty.
Forces the start to use a forked instance of java to run Jetty.
Some modules include `--exec` in order to set java command line options.
Some start options, such as `--jpms` also imply `--exec`
--exec-properties=<filename>::
Assign a fixed name to the file used to transfer properties to the sub process.
This allows the generated properties file to be saved and reused.
@ -99,7 +126,7 @@ Without this option, a temporary file is used.
--commands=<filename>::
Instructs `start.jar` to use each line of the specified file as arguments on the command line.
===== Debugg and Start Logging
===== Debug and Start Logging
--debug::
Enables debugging output of the startup procedure.
@ -275,3 +302,25 @@ If you have a need for a shaded version of `start.jar` (such as for Gradle), you
<classifier>shaded</classifier>
</dependency>
....
==== Start.jar without exec or forking.
Some Jetty modules include the `--exec` option so that java command line options can be set.
Also some `start.jar` options (eg. `--jpms`) include an implicit `--exec`.
To start jetty without forking a new JVM instance from the start JVM, the `--dry-run` option can be used to generate a command line:
....
$ CMD=$(java -jar start.jar --dry-run)
$ $CMD
....
It is possible to decompose the start command so that it can be modified:
....
$ OPTS=$(java -jar start.jar --dry-run=opts,path)
$ MAIN=$(java -jar start.jar --dry-run=main)
$ ARGS=$(java -jar start.jar --dry-run=args)
$ java $OPTS -Dextra=opt $MAIN $ARGS extra=arg
....
Alternatively to create an args file for java:
....
$ java -jar start.jar --dry-run=opts,path,main,args > /tmp/args
$ java @/tmp/args
....

View File

@ -170,6 +170,25 @@ This is typically used to pass a request to a link:{JDURL}/org/eclipse/jetty/ser
* link:{JDURL}/org/eclipse/jetty/server/handler/HandlerList.html[`HandlerList`] - A list of handlers that are called in turn until the request state is set as handled.
* link:{JDURL}/org/eclipse/jetty/server/handler/ContextHandlerCollection.html[`ContextHandlerCollection`] - A collection of Handlers, of which one is selected by best match for the context path.
[[injecting-handlers]]
==== Injecting Handlers
The `Handler` needs to be added to the server classpath as described in xref:startup-classpath[].
Then it can be added to the server, either by overriding some existing XML configuration files such as `jetty.xml` as shown below, or by defining a custom module as described in xref:custom-modules[].
[source, xml]
----
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
<Call name="setHandler">
<Arg>
<New id="myCustomJettyHandler" class="com.my.handler.CustomJettyHandler" />
</Arg>
</Call>
</Configure>
----
[[more-about-handlers]]
==== More About Handlers

View File

@ -24,15 +24,14 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.http.HostPortHttpField;
import org.eclipse.jetty.http.HttpFields;
import org.eclipse.jetty.http.HttpScheme;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http2.api.Session;
@ -53,6 +52,7 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ProxyTest
@ -137,14 +137,49 @@ public class ProxyTest
}
@Test
public void testServerBigDownloadSlowClient() throws Exception
public void testHTTPVersion() throws Exception
{
final CountDownLatch serverLatch = new CountDownLatch(1);
final byte[] content = new byte[1024 * 1024];
startServer(new HttpServlet()
{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
protected void service(HttpServletRequest request, HttpServletResponse response)
{
assertEquals(HttpVersion.HTTP_1_1.asString(), request.getProtocol());
}
});
Map<String, String> params = new HashMap<>();
params.put("proxyTo", "http://localhost:" + serverConnector.getLocalPort());
startProxy(new AsyncProxyServlet.Transparent(), params);
startClient();
CountDownLatch clientLatch = new CountDownLatch(1);
Session session = newClient(new Session.Listener.Adapter());
MetaData.Request metaData = newRequest("GET", "/", new HttpFields());
HeadersFrame frame = new HeadersFrame(metaData, null, true);
session.newStream(frame, new Promise.Adapter<>(), new Stream.Listener.Adapter()
{
@Override
public void onHeaders(Stream stream, HeadersFrame frame)
{
assertTrue(frame.isEndStream());
MetaData.Response response = (MetaData.Response)frame.getMetaData();
assertEquals(HttpStatus.OK_200, response.getStatus());
clientLatch.countDown();
}
});
assertTrue(clientLatch.await(5, TimeUnit.SECONDS));
}
@Test
public void testServerBigDownloadSlowClient() throws Exception
{
CountDownLatch serverLatch = new CountDownLatch(1);
byte[] content = new byte[1024 * 1024];
startServer(new HttpServlet()
{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws IOException
{
response.getOutputStream().write(content);
serverLatch.countDown();
@ -152,18 +187,10 @@ public class ProxyTest
});
Map<String, String> params = new HashMap<>();
params.put("proxyTo", "http://localhost:" + serverConnector.getLocalPort());
startProxy(new AsyncProxyServlet.Transparent()
{
@Override
protected void sendProxyRequest(HttpServletRequest clientRequest, HttpServletResponse proxyResponse, Request proxyRequest)
{
proxyRequest.version(HttpVersion.HTTP_1_1);
super.sendProxyRequest(clientRequest, proxyResponse, proxyRequest);
}
}, params);
startProxy(new AsyncProxyServlet.Transparent(), params);
startClient();
final CountDownLatch clientLatch = new CountDownLatch(1);
CountDownLatch clientLatch = new CountDownLatch(1);
Session session = newClient(new Session.Listener.Adapter());
MetaData.Request metaData = newRequest("GET", "/", new HttpFields());
HeadersFrame frame = new HeadersFrame(metaData, null, true);

View File

@ -50,7 +50,6 @@ import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.HttpVersion;
import org.eclipse.jetty.util.HttpCookieStore;
import org.eclipse.jetty.util.ProcessorUtils;
import org.eclipse.jetty.util.StringUtil;
@ -457,9 +456,10 @@ public abstract class AbstractProxyServlet extends HttpServlet
protected Request newProxyRequest(HttpServletRequest request, String rewrittenTarget)
{
// Do not copy the HTTP version, since the client-to-proxy
// version may be different from the proxy-to-server version.
return getHttpClient().newRequest(rewrittenTarget)
.method(request.getMethod())
.version(HttpVersion.fromString(request.getProtocol()))
.attribute(CLIENT_REQUEST_ATTRIBUTE, request);
}

View File

@ -185,7 +185,7 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
}
catch (Throwable x)
{
_log.info("Exception while transforming " + transformer, x);
_log.info("Exception while transforming {} ", transformer, x);
throw x;
}
}

View File

@ -23,6 +23,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.ByteBuffer;
@ -38,6 +41,7 @@ import java.util.Map;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
@ -100,9 +104,9 @@ public class AsyncMiddleManServletTest
private HttpClient client;
private Server proxy;
private ServerConnector proxyConnector;
private AsyncMiddleManServlet proxyServlet;
private Server server;
private ServerConnector serverConnector;
private StacklessLogging stackless;
private void startServer(HttpServlet servlet) throws Exception
{
@ -140,13 +144,12 @@ public class AsyncMiddleManServletTest
proxy.addConnector(proxyConnector);
ServletContextHandler proxyContext = new ServletContextHandler(proxy, "/", true, false);
this.proxyServlet = proxyServlet;
ServletHolder proxyServletHolder = new ServletHolder(proxyServlet);
proxyServletHolder.setInitParameters(initParams);
proxyContext.addServlet(proxyServletHolder, "/*");
proxy.start();
stackless = new StacklessLogging(proxyServlet._log);
}
private void startClient() throws Exception
@ -165,7 +168,6 @@ public class AsyncMiddleManServletTest
client.stop();
proxy.stop();
server.stop();
stackless.close();
}
@Test
@ -511,43 +513,46 @@ public class AsyncMiddleManServletTest
});
startClient();
byte[] bytes = new byte[1024];
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.content(new BytesContentProvider(bytes))
.timeout(5, TimeUnit.SECONDS)
.send();
try (StacklessLogging ignored = new StacklessLogging(proxyServlet._log))
{
byte[] bytes = new byte[1024];
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.content(new BytesContentProvider(bytes))
.timeout(5, TimeUnit.SECONDS)
.send();
assertEquals(500, response.getStatus());
assertEquals(500, response.getStatus());
}
}
@Test
public void testUpstreamTransformationThrowsAfterCommittingProxyRequest() throws Exception
{
try (StacklessLogging ignored = new StacklessLogging(HttpChannel.class))
startServer(new EchoHttpServlet());
startProxy(new AsyncMiddleManServlet()
{
startServer(new EchoHttpServlet());
startProxy(new AsyncMiddleManServlet()
@Override
protected ContentTransformer newClientRequestContentTransformer(HttpServletRequest clientRequest, Request proxyRequest)
{
@Override
protected ContentTransformer newClientRequestContentTransformer(HttpServletRequest clientRequest, Request proxyRequest)
return new ContentTransformer()
{
return new ContentTransformer()
private int count;
@Override
public void transform(ByteBuffer input, boolean finished, List<ByteBuffer> output)
{
private int count;
@Override
public void transform(ByteBuffer input, boolean finished, List<ByteBuffer> output)
{
if (++count < 2)
output.add(input);
else
throw new NullPointerException("explicitly_thrown_by_test");
}
};
}
});
startClient();
if (++count < 2)
output.add(input);
else
throw new NullPointerException("explicitly_thrown_by_test");
}
};
}
});
startClient();
try (StacklessLogging ignored = new StacklessLogging(proxyServlet._log))
{
CountDownLatch latch = new CountDownLatch(1);
DeferredContentProvider content = new DeferredContentProvider();
client.newRequest("localhost", serverConnector.getLocalPort())
@ -628,11 +633,14 @@ public class AsyncMiddleManServletTest
});
startClient();
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.timeout(5, TimeUnit.SECONDS)
.send();
try (StacklessLogging ignored = new StacklessLogging(proxyServlet._log))
{
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.timeout(5, TimeUnit.SECONDS)
.send();
assertEquals(502, response.getStatus());
assertEquals(502, response.getStatus());
}
}
@Test
@ -1037,31 +1045,70 @@ public class AsyncMiddleManServletTest
});
startClient();
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.timeout(5, TimeUnit.SECONDS)
.send();
assertEquals(200, response.getStatus());
@SuppressWarnings("unchecked")
Map<String, Object> obj = (Map<String, Object>)JSON.parse(response.getContentAsString());
assertNotNull(obj);
assertEquals(2, obj.size());
assertEquals(value0, obj.get(key0));
assertEquals(value1, obj.get(key2));
// Make sure the files do not exist.
try (DirectoryStream<Path> paths = Files.newDirectoryStream(targetTestsDir, inputPrefix + "*.*"))
try
{
assertFalse(paths.iterator().hasNext());
}
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.timeout(15, TimeUnit.SECONDS)
.send();
// File deletion is delayed on windows, testing for deletion is not going to work
if (!OS.WINDOWS.isCurrentOs())
{
try (DirectoryStream<Path> paths = Files.newDirectoryStream(targetTestsDir, outputPrefix + "*.*"))
assertEquals(200, response.getStatus());
@SuppressWarnings("unchecked")
Map<String, Object> obj = (Map<String, Object>)JSON.parse(response.getContentAsString());
assertNotNull(obj);
assertEquals(2, obj.size());
assertEquals(value0, obj.get(key0));
assertEquals(value1, obj.get(key2));
// File deletion is delayed on windows, testing for deletion is not going to work
if (!OS.WINDOWS.isCurrentOs())
{
assertFalse(paths.iterator().hasNext());
try (DirectoryStream<Path> paths = Files.newDirectoryStream(targetTestsDir, outputPrefix + "*.*"))
{
assertFalse(paths.iterator().hasNext());
}
}
}
catch (TimeoutException e)
{
LOG.warn("Client Dump");
QueuedThreadPool qtp = (QueuedThreadPool)client.getExecutor();
qtp.setDetailedDump(true);
client.dumpStdErr();
LOG.warn("Server Dump");
qtp = (QueuedThreadPool)server.getThreadPool();
qtp.setDetailedDump(true);
server.dumpStdErr();
LOG.warn("Thread Dump");
System.err.println(generateThreadDump());
throw e;
}
}
public static String generateThreadDump()
{
StringBuilder dump = new StringBuilder();
ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
for (ThreadInfo thread : threadMXBean.getThreadInfo(threadMXBean.getAllThreadIds(), 400))
{
dump.append('"').append(thread.getThreadName()).append("\" ");
dump.append(" #").append(thread.getThreadId());
dump.append("\n java.lang.Thread.State: ");
Thread.State state = thread.getThreadState();
dump.append(state.name());
if (state == Thread.State.BLOCKED || state == Thread.State.WAITING || state == Thread.State.TIMED_WAITING)
{
dump.append(" (locked on ");
dump.append(thread.getLockInfo());
dump.append(')');
}
for (StackTraceElement stackTraceElement : thread.getStackTrace())
{
dump.append("\n\tat ");
dump.append(stackTraceElement);
}
dump.append("\n\n");
}
return dump.toString();
}
@Test
@ -1122,7 +1169,7 @@ public class AsyncMiddleManServletTest
return data.length + 1;
}
})
.timeout(5 * idleTimeout, TimeUnit.MILLISECONDS)
.timeout(15 * idleTimeout, TimeUnit.MILLISECONDS)
.send();
assertTrue(destroyLatch.await(5 * idleTimeout, TimeUnit.MILLISECONDS));
@ -1182,7 +1229,7 @@ public class AsyncMiddleManServletTest
startClient();
ContentResponse response = client.newRequest("localhost", serverConnector.getLocalPort())
.timeout(5, TimeUnit.SECONDS)
.timeout(15, TimeUnit.SECONDS)
.send();
assertTrue(serviceLatch.await(5, TimeUnit.SECONDS));

View File

@ -578,7 +578,7 @@ public class ResourceService
{
//Get jetty's Response impl
String mdlm = content.getLastModifiedValue();
if (mdlm != null && ifms.equals(mdlm))
if (ifms.equals(mdlm))
{
sendStatus(response, HttpServletResponse.SC_NOT_MODIFIED, content::getETagValue);
return false;
@ -674,10 +674,10 @@ public class ResourceService
content.getResource().writeTo(out, 0, content_length);
}
// else if we can't do a bypass write because of wrapping
else if (written || !(out instanceof HttpOutput))
else if (written)
{
// write normally
putHeaders(response, content, written ? -1 : 0);
putHeaders(response, content, Response.NO_CONTENT_LENGTH);
ByteBuffer buffer = content.getIndirectBuffer();
if (buffer != null)
BufferUtil.writeTo(buffer, out);
@ -688,7 +688,7 @@ public class ResourceService
else
{
// write the headers
putHeaders(response, content, 0);
putHeaders(response, content, Response.USE_KNOWN_CONTENT_LENGTH);
// write the content asynchronously if supported
if (request.isAsyncSupported() && content.getContentLengthValue() > response.getBufferSize())
@ -736,7 +736,7 @@ public class ResourceService
// if there are no satisfiable ranges, send 416 response
if (ranges == null || ranges.size() == 0)
{
putHeaders(response, content, 0);
putHeaders(response, content, Response.USE_KNOWN_CONTENT_LENGTH);
response.setHeader(HttpHeader.CONTENT_RANGE.asString(),
InclusiveByteRange.to416HeaderRangeString(content_length));
sendStatus(response, HttpServletResponse.SC_REQUESTED_RANGE_NOT_SATISFIABLE, null);
@ -763,8 +763,8 @@ public class ResourceService
// 216 response which does not require an overall
// content-length header
//
putHeaders(response, content, -1);
String mimetype = (content == null ? null : content.getContentTypeValue());
putHeaders(response, content, Response.NO_CONTENT_LENGTH);
String mimetype = content.getContentTypeValue();
if (mimetype == null)
LOG.warn("Unknown mimetype for " + request.getRequestURI());
MultiPartOutputStream multi = new MultiPartOutputStream(out);

View File

@ -71,6 +71,8 @@ public class Response implements HttpServletResponse
private static final Logger LOG = Log.getLogger(Response.class);
private static final int __MIN_BUFFER_SIZE = 1;
private static final HttpField __EXPIRES_01JAN1970 = new PreEncodedHttpField(HttpHeader.EXPIRES, DateGenerator.__01Jan1970);
public static final int NO_CONTENT_LENGTH = -1;
public static final int USE_KNOWN_CONTENT_LENGTH = -2;
public enum OutputType
{
@ -1289,12 +1291,12 @@ public class Response implements HttpServletResponse
if (lm != null)
_fields.put(lm);
if (contentLength == 0)
if (contentLength == USE_KNOWN_CONTENT_LENGTH)
{
_fields.put(content.getContentLength());
_contentLength = content.getContentLengthValue();
}
else if (contentLength > 0)
else if (contentLength > NO_CONTENT_LENGTH)
{
_fields.putLongField(HttpHeader.CONTENT_LENGTH, contentLength);
_contentLength = contentLength;
@ -1337,9 +1339,9 @@ public class Response implements HttpServletResponse
if (lml >= 0)
response.setDateHeader(HttpHeader.LAST_MODIFIED.asString(), lml);
if (contentLength == 0)
if (contentLength == USE_KNOWN_CONTENT_LENGTH)
contentLength = content.getContentLengthValue();
if (contentLength >= 0)
if (contentLength > NO_CONTENT_LENGTH)
{
if (contentLength < Integer.MAX_VALUE)
response.setContentLength((int)contentLength);

View File

@ -767,7 +767,9 @@ public class SessionHandler extends ScopedHandler
try
{
_sessionCache.add(id, session);
Request.getBaseRequest(request).enterSession(session);
Request baseRequest = Request.getBaseRequest(request);
baseRequest.setSession(session);
baseRequest.enterSession(session);
_sessionsCreatedStats.increment();
if (request != null && request.isSecure())

View File

@ -462,20 +462,28 @@ public class DefaultServlet extends HttpServlet implements ResourceFactory, Welc
doGet(request, response);
}
@Override
protected void doHead(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
doGet(request, response);
}
/* (non-Javadoc)
* @see javax.servlet.http.HttpServlet#doTrace(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
protected void doTrace(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
protected void doTrace(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
resp.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
}
@Override
protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
protected void doOptions(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
resp.setHeader("Allow", "GET,HEAD,POST,OPTIONS");
response.setHeader("Allow", "GET,HEAD,POST,OPTIONS");
}
/*

View File

@ -206,7 +206,7 @@ public class Main
StartLog.debug("%s - %s", invokedClass, invokedClass.getPackage().getImplementationVersion());
CommandLineBuilder cmd = args.getMainArgs(false);
CommandLineBuilder cmd = args.getMainArgs(StartArgs.ARG_PARTS);
String[] argArray = cmd.getArgs().toArray(new String[0]);
StartLog.debug("Command Line Args: %s", cmd.toString());
@ -415,7 +415,7 @@ public class Main
// Show Command Line to execute Jetty
if (args.isDryRun())
{
CommandLineBuilder cmd = args.getMainArgs(true);
CommandLineBuilder cmd = args.getMainArgs(args.getDryRunParts());
System.out.println(cmd.toString(StartLog.isDebugEnabled() ? " \\\n" : " "));
}
@ -454,7 +454,7 @@ public class Main
// execute Jetty in another JVM
if (args.isExec())
{
CommandLineBuilder cmd = args.getMainArgs(true);
CommandLineBuilder cmd = args.getMainArgs(StartArgs.ALL_PARTS);
cmd.debug();
ProcessBuilder pbuilder = new ProcessBuilder(cmd.getArgs());
StartLog.endStartLog();

View File

@ -57,6 +57,14 @@ import org.eclipse.jetty.util.ManifestUtils;
public class StartArgs
{
public static final String VERSION;
public static final Set<String> ALL_PARTS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"java",
"opts",
"path",
"main",
"args")));
public static final Set<String> ARG_PARTS = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"args")));
static
{
@ -219,6 +227,7 @@ public class StartArgs
private boolean listConfig = false;
private boolean version = false;
private boolean dryRun = false;
private final Set<String> dryRunParts = new HashSet<>();
private boolean jpms = false;
private boolean createStartd = false;
private boolean updateIni = false;
@ -675,8 +684,11 @@ public class StartArgs
return jvmArgs;
}
public CommandLineBuilder getMainArgs(boolean addJavaInit) throws IOException
public CommandLineBuilder getMainArgs(Set<String> parts) throws IOException
{
if (parts.isEmpty())
parts = ALL_PARTS;
CommandLineBuilder cmd = new CommandLineBuilder();
// Special Stop/Shutdown properties
@ -684,10 +696,11 @@ public class StartArgs
ensureSystemPropertySet("STOP.KEY");
ensureSystemPropertySet("STOP.WAIT");
if (addJavaInit)
{
if (parts.contains("java"))
cmd.addRawArg(CommandLineBuilder.findJavaBin());
if (parts.contains("opts"))
{
cmd.addRawArg("-Djava.io.tmpdir=" + System.getProperty("java.io.tmpdir"));
cmd.addRawArg("-Djetty.home=" + baseHome.getHome());
cmd.addRawArg("-Djetty.base=" + baseHome.getBase());
@ -702,6 +715,7 @@ public class StartArgs
Prop p = processSystemProperty(key, value, null);
cmd.addRawArg("-D" + p.key + "=" + getProperties().expand(p.value));
}
else
{
@ -715,7 +729,10 @@ public class StartArgs
String value = System.getProperty(propKey);
cmd.addEqualsArg("-D" + propKey, value);
}
}
if (parts.contains("path"))
{
if (isJPMS())
{
Map<Boolean, List<File>> dirsAndFiles = StreamSupport.stream(classpath.spliterator(), false)
@ -764,52 +781,58 @@ public class StartArgs
cmd.addRawArg("--add-reads");
cmd.addRawArg(entry.getKey() + "=" + String.join(",", entry.getValue()));
}
cmd.addRawArg("--module");
cmd.addRawArg(getMainClassname());
}
else
{
cmd.addRawArg("-cp");
cmd.addRawArg(classpath.toString());
cmd.addRawArg(getMainClassname());
}
}
if (parts.contains("main"))
{
if (isJPMS())
cmd.addRawArg("--module");
cmd.addRawArg(getMainClassname());
}
// pass properties as args or as a file
if (dryRun && execProperties == null)
if (parts.contains("args"))
{
for (Prop p : properties)
if (dryRun && execProperties == null)
{
cmd.addRawArg(CommandLineBuilder.quote(p.key) + "=" + CommandLineBuilder.quote(p.value));
for (Prop p : properties)
{
cmd.addRawArg(CommandLineBuilder.quote(p.key) + "=" + CommandLineBuilder.quote(p.value));
}
}
}
else if (properties.size() > 0)
{
Path propPath;
if (execProperties == null)
else if (properties.size() > 0)
{
propPath = Files.createTempFile("start_", ".properties");
propPath.toFile().deleteOnExit();
}
else
propPath = new File(execProperties).toPath();
Path propPath;
if (execProperties == null)
{
propPath = Files.createTempFile("start_", ".properties");
propPath.toFile().deleteOnExit();
}
else
propPath = new File(execProperties).toPath();
try (OutputStream out = Files.newOutputStream(propPath))
try (OutputStream out = Files.newOutputStream(propPath))
{
properties.store(out, "start.jar properties");
}
cmd.addRawArg(propPath.toAbsolutePath().toString());
}
for (Path xml : xmls)
{
properties.store(out, "start.jar properties");
cmd.addRawArg(xml.toAbsolutePath().toString());
}
cmd.addRawArg(propPath.toAbsolutePath().toString());
}
for (Path xml : xmls)
{
cmd.addRawArg(xml.toAbsolutePath().toString());
}
for (Path propertyFile : propertyFiles)
{
cmd.addRawArg(propertyFile.toAbsolutePath().toString());
for (Path propertyFile : propertyFiles)
{
cmd.addRawArg(propertyFile.toAbsolutePath().toString());
}
}
return cmd;
@ -935,6 +958,11 @@ public class StartArgs
return dryRun;
}
public Set<String> getDryRunParts()
{
return dryRunParts;
}
public boolean isExec()
{
return exec;
@ -1152,6 +1180,21 @@ public class StartArgs
return;
}
if (arg.startsWith("--dry-run="))
{
int colon = arg.indexOf('=');
for (String part : arg.substring(colon + 1).split(","))
{
if (!ALL_PARTS.contains(part))
throw new UsageException(UsageException.ERR_BAD_ARG, "Unrecognized --dry-run=\"%s\" in %s", part, source);
dryRunParts.add(part);
}
dryRun = true;
run = false;
return;
}
// Enable forked execution of Jetty server
if ("--exec".equals(arg))
{

View File

@ -28,7 +28,30 @@ Command Line Options:
--dry-run Print the command line that the start.jar generates,
then exit. This may be used to generate command lines
when the start.ini includes -X or -D arguments.
when the start.ini includes -X or -D arguments:
java -jar start.jar --dry-run > jetty.sh
. jetty.sh
--dry-run=parts Print specific parts of the command line. The parts
are a comma separated list of
o "java" - the JVM to run
o "opts" - the JVM options (eg -D and -X flags)
o "path" - the JVM class path or JPMS modules options
o "main" - the main class to run
o "args" - the arguments passed to the main class
It is possible to decompose the start command:
OPTS=$(java -jar start.jar --dry-run=opts,path)
MAIN=$(java -jar start.jar --dry-run=main)
ARGS=$(java -jar start.jar --dry-run=args)
java $OPTS -Dextra=opt $MAIN $ARGS extra=arg
Alternatively to create an args file for java:
java -jar start.jar --dry-run=opts,path,main,args > /tmp/args
java @/tmp/args
--exec Run the generated command line (see --dry-run) in
a sub process. This can be used when start.ini
@ -59,7 +82,6 @@ Debug and Start Logging:
issues where the jetty specific logger has not yet kicked
in due to startup configuration errors.
Module Management:
------------------

View File

@ -193,7 +193,7 @@ public class MainTest
assertThat("jetty.home", baseHome.getHome(), is(homePath.toString()));
assertThat("jetty.base", baseHome.getBase(), is(homePath.toString()));
CommandLineBuilder commandLineBuilder = args.getMainArgs(true);
CommandLineBuilder commandLineBuilder = args.getMainArgs(StartArgs.ALL_PARTS);
String commandLine = commandLineBuilder.toString("\n");
String expectedExpansion = String.format("-Xloggc:%s/logs/gc-%s.log",
baseHome.getBase(), System.getProperty("java.version")

View File

@ -25,7 +25,10 @@ import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.function.UnaryOperator;
import java.util.stream.Collectors;
import javax.net.ssl.SNIMatcher;
import javax.net.ssl.SSLEngine;
@ -49,6 +52,7 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
private final X509ExtendedKeyManager _delegate;
private final SslContextFactory.Server _sslContextFactory;
private UnaryOperator<String> _aliasMapper = UnaryOperator.identity();
/**
* @deprecated not supported, you must have a {@link SslContextFactory.Server} for this to work.
@ -65,6 +69,38 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
_sslContextFactory = Objects.requireNonNull(sslContextFactory, "SslContextFactory.Server must be provided");
}
/**
* @return the function that transforms the alias
* @see #setAliasMapper(UnaryOperator)
*/
public UnaryOperator<String> getAliasMapper()
{
return _aliasMapper;
}
/**
* <p>Sets a function that transforms the alias into a possibly different alias,
* invoked when the SNI logic must choose the alias to pick the right certificate.</p>
* <p>This function is required when using the
* {@link SslContextFactory.Server#setKeyManagerFactoryAlgorithm(String) PKIX KeyManagerFactory algorithm}
* which suffers from bug https://bugs.openjdk.java.net/browse/JDK-8246262,
* where aliases are returned by the OpenJDK implementation to the application
* in the form {@code N.0.alias} where {@code N} is an always increasing number.
* Such mangled aliases won't match the aliases in the keystore, so that for
* example SNI matching will always fail.</p>
* <p>Other implementations such as BouncyCastle have been reported to mangle
* the alias in a different way, namely {@code 0.alias.N}.</p>
* <p>This function allows to "unmangle" the alias from the implementation
* specific mangling back to just {@code alias} so that SNI matching will work
* again.</p>
*
* @param aliasMapper the function that transforms the alias
*/
public void setAliasMapper(UnaryOperator<String> aliasMapper)
{
_aliasMapper = Objects.requireNonNull(aliasMapper);
}
@Override
public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket)
{
@ -80,10 +116,15 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
protected String chooseServerAlias(String keyType, Principal[] issuers, Collection<SNIMatcher> matchers, SSLSession session)
{
// Look for the aliases that are suitable for the keyType and issuers.
String[] aliases = _delegate.getServerAliases(keyType, issuers);
if (aliases == null || aliases.length == 0)
String[] mangledAliases = _delegate.getServerAliases(keyType, issuers);
if (mangledAliases == null || mangledAliases.length == 0)
return null;
// Apply the alias mapping, keeping the alias order.
Map<String, String> aliasMap = new LinkedHashMap<>();
Arrays.stream(mangledAliases)
.forEach(alias -> aliasMap.put(getAliasMapper().apply(alias), alias));
// Find our SNIMatcher. There should only be one and it always matches (always returns true
// from AliasSNIMatcher.matches), but it will capture the SNI Host if one was presented.
String host = matchers == null ? null : matchers.stream()
@ -96,35 +137,40 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
try
{
// Filter the certificates by alias.
Collection<X509> certificates = Arrays.stream(aliases)
Collection<X509> certificates = aliasMap.keySet().stream()
.map(_sslContextFactory::getX509)
.filter(Objects::nonNull)
.collect(Collectors.toList());
// delegate the decision to accept to the sniSelector
// Delegate the decision to accept to the sniSelector.
SniSelector sniSelector = _sslContextFactory.getSNISelector();
if (sniSelector == null)
sniSelector = _sslContextFactory;
String alias = sniSelector.sniSelect(keyType, issuers, session, host, certificates);
// Check selected alias
if (alias != null && alias != SniSelector.DELEGATE)
{
// Make sure we got back an alias from the acceptable aliases.
X509 x509 = _sslContextFactory.getX509(alias);
if (!Arrays.asList(aliases).contains(alias) || x509 == null)
{
if (LOG.isDebugEnabled())
LOG.debug("Invalid X509 match for SNI {}: {}", host, alias);
return null;
}
// Check the selected alias.
if (alias == null || alias == SniSelector.DELEGATE)
return alias;
// Make sure we got back an alias from the acceptable aliases.
X509 x509 = _sslContextFactory.getX509(alias);
if (!aliasMap.containsKey(alias) || x509 == null)
{
if (LOG.isDebugEnabled())
LOG.debug("Matched SNI {} with X509 {} from {}", host, x509, Arrays.asList(aliases));
if (session != null)
session.putValue(SNI_X509, x509);
LOG.debug("Invalid X509 match for SNI {}: {}", host, alias);
return null;
}
return alias;
if (session != null)
session.putValue(SNI_X509, x509);
// Convert the selected alias back to the original
// value before the alias mapping performed above.
String mangledAlias = aliasMap.get(alias);
if (LOG.isDebugEnabled())
LOG.debug("Matched SNI {} with alias {}, certificate {} from aliases {}", host, mangledAlias, x509, aliasMap.keySet());
return mangledAlias;
}
catch (Throwable x)
{
@ -141,10 +187,11 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
String alias = (socket == null)
? chooseServerAlias(keyType, issuers, Collections.emptyList(), null)
: chooseServerAlias(keyType, issuers, sslSocket.getSSLParameters().getSNIMatchers(), sslSocket.getHandshakeSession());
if (alias == SniSelector.DELEGATE)
boolean delegate = alias == SniSelector.DELEGATE;
if (delegate)
alias = _delegate.chooseServerAlias(keyType, issuers, socket);
if (LOG.isDebugEnabled())
LOG.debug("Chose alias {}/{} on {}", alias, keyType, socket);
LOG.debug("Chose {} alias {}/{} on {}", delegate ? "delegate" : "explicit", alias, keyType, socket);
return alias;
}
@ -154,10 +201,11 @@ public class SniX509ExtendedKeyManager extends X509ExtendedKeyManager
String alias = (engine == null)
? chooseServerAlias(keyType, issuers, Collections.emptyList(), null)
: chooseServerAlias(keyType, issuers, engine.getSSLParameters().getSNIMatchers(), engine.getHandshakeSession());
if (alias == SniSelector.DELEGATE)
boolean delegate = alias == SniSelector.DELEGATE;
if (delegate)
alias = _delegate.chooseEngineServerAlias(keyType, issuers, engine);
if (LOG.isDebugEnabled())
LOG.debug("Chose alias {}/{} on {}", alias, keyType, engine);
LOG.debug("Chose {} alias {}/{} on {}", delegate ? "delegate" : "explicit", alias, keyType, engine);
return alias;
}

View File

@ -20,14 +20,28 @@ package org.eclipse.jetty.util.ssl;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.security.KeyStore;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.net.ssl.SNIHostName;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.X509ExtendedKeyManager;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.log.StacklessLogging;
import org.eclipse.jetty.util.resource.Resource;
@ -43,6 +57,8 @@ import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.matchesRegex;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@ -362,4 +378,81 @@ public class SslContextFactoryTest
assertNull(cf.getEndpointIdentificationAlgorithm());
}
@Test
public void testSNIWithPKIX() throws Exception
{
SslContextFactory.Server serverTLS = new SslContextFactory.Server()
{
@Override
protected X509ExtendedKeyManager newSniX509ExtendedKeyManager(X509ExtendedKeyManager keyManager)
{
SniX509ExtendedKeyManager result = new SniX509ExtendedKeyManager(keyManager, this);
result.setAliasMapper(alias ->
{
// Workaround for https://bugs.openjdk.java.net/browse/JDK-8246262.
Matcher matcher = Pattern.compile(".*\\..*\\.(.*)").matcher(alias);
if (matcher.matches())
return matcher.group(1);
return alias;
});
return result;
}
};
// This test requires a SNI keystore so that the X509ExtendedKeyManager is wrapped.
serverTLS.setKeyStoreResource(Resource.newSystemResource("keystore_sni.p12"));
serverTLS.setKeyStorePassword("storepwd");
serverTLS.setKeyManagerPassword("keypwd");
serverTLS.setKeyManagerFactoryAlgorithm("PKIX");
// Don't pick a default certificate if SNI does not match.
serverTLS.setSniRequired(true);
serverTLS.start();
SslContextFactory.Client clientTLS = new SslContextFactory.Client(true);
clientTLS.start();
try (SSLServerSocket serverSocket = serverTLS.newSslServerSocket(null, 0, 128);
SSLSocket clientSocket = clientTLS.newSslSocket())
{
SSLParameters sslParameters = clientSocket.getSSLParameters();
String hostName = "jetty.eclipse.org";
sslParameters.setServerNames(Collections.singletonList(new SNIHostName(hostName)));
clientSocket.setSSLParameters(sslParameters);
clientSocket.connect(new InetSocketAddress("localhost", serverSocket.getLocalPort()), 5000);
try (SSLSocket sslSocket = (SSLSocket)serverSocket.accept())
{
byte[] data = "HELLO".getBytes(StandardCharsets.UTF_8);
new Thread(() ->
{
try
{
// Start the TLS handshake and verify that
// the client got the right server certificate.
clientSocket.startHandshake();
Certificate[] certificates = clientSocket.getSession().getPeerCertificates();
assertThat(certificates.length, greaterThan(0));
X509Certificate certificate = (X509Certificate)certificates[0];
assertThat(certificate.getSubjectX500Principal().getName(), startsWith("CN=" + hostName));
// Send some data to verify communication is ok.
OutputStream output = clientSocket.getOutputStream();
output.write(data);
output.flush();
clientSocket.close();
}
catch (Throwable x)
{
x.printStackTrace();
}
}).start();
// Verify that we received the data the client sent.
sslSocket.setSoTimeout(5000);
InputStream input = sslSocket.getInputStream();
byte[] bytes = IO.readBytes(input);
assertArrayEquals(data, bytes);
}
}
clientTLS.stop();
serverTLS.stop();
}
}

View File

@ -1,4 +1,3 @@
# Setup default logging implementation for during testing
org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
#org.eclipse.jetty.util.LEVEL=DEBUG
#org.eclipse.jetty.util.PathWatcher.LEVEL=DEBUG

View File

@ -244,6 +244,31 @@ public class HugeResourceTest
}
}
@ParameterizedTest
@MethodSource("staticFiles")
public void testHead(String filename, long expectedSize) throws Exception
{
URI destUri = server.getURI().resolve("/" + filename);
InputStreamResponseListener responseListener = new InputStreamResponseListener();
Request request = client.newRequest(destUri)
.method(HttpMethod.HEAD);
request.send(responseListener);
Response response = responseListener.get(5, TimeUnit.SECONDS);
try (InputStream in = responseListener.getInputStream())
{
assertThat(in.read(), is(-1));
}
assertThat("HTTP Response Code", response.getStatus(), is(200));
// dumpResponse(response);
String contentLength = response.getHeaders().get(HttpHeader.CONTENT_LENGTH);
long contentLengthLong = Long.parseLong(contentLength);
assertThat("Http Response Header: \"Content-Length: " + contentLength + "\"", contentLengthLong, is(expectedSize));
}
@ParameterizedTest
@MethodSource("staticFiles")
public void testUpload(String filename, long expectedSize) throws Exception

View File

@ -0,0 +1,177 @@
//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.websocket.tests;
import java.net.URI;
import java.nio.ByteBuffer;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.BlockingArrayQueue;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.websocket.api.RemoteEndpoint;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.StatusCode;
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
import org.eclipse.jetty.websocket.api.annotations.WebSocket;
import org.eclipse.jetty.websocket.api.util.WSURI;
import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer;
import org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class SingleOnMessageTest
{
private final Server server = new Server();
private final WebSocketClient client = new WebSocketClient();
private final EventSocket serverSocket = new EventSocket();
private URI serverUri;
@BeforeEach
public void start() throws Exception
{
ServerConnector connector = new ServerConnector(server);
server.addConnector(connector);
ServletContextHandler contextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
contextHandler.setContextPath("/");
NativeWebSocketServletContainerInitializer.configure(contextHandler,
(context, container) -> container.addMapping("/", (req, resp) -> serverSocket));
WebSocketUpgradeFilter.configure(contextHandler);
server.setHandler(contextHandler);
server.start();
serverUri = WSURI.toWebsocket(server.getURI());
client.start();
}
@AfterEach
public void stop() throws Exception
{
client.stop();
server.stop();
}
@Test
public void testTextHandler() throws Exception
{
TextOnlyHandler handler = new TextOnlyHandler();
client.connect(handler, serverUri);
assertTrue(handler.openLatch.await(5, TimeUnit.SECONDS));
assertTrue(serverSocket.openLatch.await(5, TimeUnit.SECONDS));
// The server sends a sequence of Binary and Text messages
RemoteEndpoint remote = serverSocket.session.getRemote();
remote.sendBytes(BufferUtil.toBuffer("this should get rejected"));
remote.sendString("WebSocket_Data0");
remote.sendString("WebSocket_Data1");
serverSocket.session.close(StatusCode.NORMAL, "test complete");
// The client receives the messages and has discarded the binary message.
assertThat(handler.messages.poll(5, TimeUnit.SECONDS), is("WebSocket_Data0"));
assertThat(handler.messages.poll(5, TimeUnit.SECONDS), is("WebSocket_Data1"));
assertTrue(handler.closeLatch.await(5, TimeUnit.SECONDS));
assertThat(handler.closeCode, is(StatusCode.NORMAL));
assertThat(handler.closeReason, is("test complete"));
}
@Test
public void testBinaryHandler() throws Exception
{
BinaryOnlyHandler handler = new BinaryOnlyHandler();
client.connect(handler, serverUri);
assertTrue(handler.openLatch.await(5, TimeUnit.SECONDS));
assertTrue(serverSocket.openLatch.await(5, TimeUnit.SECONDS));
// The server sends a sequence of Binary and Text messages
RemoteEndpoint remote = serverSocket.session.getRemote();
remote.sendString("this should get rejected");
remote.sendBytes(BufferUtil.toBuffer("WebSocket_Data0"));
remote.sendBytes(BufferUtil.toBuffer("WebSocket_Data1"));
serverSocket.session.close(StatusCode.NORMAL, "test complete");
// The client receives the messages and has discarded the binary message.
assertThat(handler.messages.poll(5, TimeUnit.SECONDS), is(BufferUtil.toBuffer("WebSocket_Data0")));
assertThat(handler.messages.poll(5, TimeUnit.SECONDS), is(BufferUtil.toBuffer("WebSocket_Data1")));
assertTrue(handler.closeLatch.await(5, TimeUnit.SECONDS));
assertThat(handler.closeCode, is(StatusCode.NORMAL));
assertThat(handler.closeReason, is("test complete"));
}
@WebSocket
public static class TextOnlyHandler extends AbstractHandler
{
final BlockingArrayQueue<String> messages = new BlockingArrayQueue<>();
@OnWebSocketMessage
public void onMessage(String message)
{
messages.add(message);
}
}
@WebSocket
public static class BinaryOnlyHandler extends AbstractHandler
{
final BlockingArrayQueue<ByteBuffer> messages = new BlockingArrayQueue<>();
@OnWebSocketMessage
public void onMessage(byte[] array, int offset, int length)
{
messages.add(BufferUtil.toBuffer(array, offset, length));
}
}
@WebSocket
public static class AbstractHandler
{
final CountDownLatch openLatch = new CountDownLatch(1);
final CountDownLatch closeLatch = new CountDownLatch(1);
Session session;
int closeCode;
String closeReason;
@OnWebSocketClose
public void onClose(int statusCode, String reason)
{
this.closeCode = statusCode;
this.closeReason = reason;
this.closeLatch.countDown();
}
@OnWebSocketConnect
public void onConnect(Session session)
{
this.session = session;
this.openLatch.countDown();
}
}
}

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.websocket.common.events;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Objects;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Utf8Appendable.NotUtf8Exception;
@ -42,7 +43,7 @@ import org.eclipse.jetty.websocket.common.message.MessageAppender;
*/
public abstract class AbstractEventDriver extends AbstractLifeCycle implements IncomingFrames, EventDriver
{
private static final Logger LOG = Log.getLogger(AbstractEventDriver.class);
private final Logger logger;
protected final Logger targetLog;
protected WebSocketPolicy policy;
protected final Object websocket;
@ -51,8 +52,9 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
public AbstractEventDriver(WebSocketPolicy policy, Object websocket)
{
this.logger = Log.getLogger(this.getClass());
this.policy = policy;
this.websocket = websocket;
this.websocket = Objects.requireNonNull(websocket, "WebSocket endpoint may not be null");
this.targetLog = Log.getLogger(websocket.getClass());
}
@ -87,9 +89,9 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
@Override
public void incomingFrame(Frame frame)
{
if (LOG.isDebugEnabled())
if (logger.isDebugEnabled())
{
LOG.debug("incomingFrame({})", frame);
logger.debug("incomingFrame({})", frame);
}
try
@ -112,9 +114,9 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
}
case OpCode.PING:
{
if (LOG.isDebugEnabled())
if (logger.isDebugEnabled())
{
LOG.debug("PING: {}", BufferUtil.toDetailString(frame.getPayload()));
logger.debug("PING: {}", BufferUtil.toDetailString(frame.getPayload()));
}
ByteBuffer pongBuf;
if (frame.hasPayload())
@ -133,9 +135,9 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
}
case OpCode.PONG:
{
if (LOG.isDebugEnabled())
if (logger.isDebugEnabled())
{
LOG.debug("PONG: {}", BufferUtil.toDetailString(frame.getPayload()));
logger.debug("PONG: {}", BufferUtil.toDetailString(frame.getPayload()));
}
onPong(frame.getPayload());
break;
@ -157,8 +159,8 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
}
default:
{
if (LOG.isDebugEnabled())
LOG.debug("Unhandled OpCode: {}", opcode);
if (logger.isDebugEnabled())
logger.debug("Unhandled OpCode: {}", opcode);
}
}
}
@ -202,10 +204,9 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
@Override
public void openSession(WebSocketSession session)
{
if (LOG.isDebugEnabled())
if (logger.isDebugEnabled())
{
LOG.debug("openSession({})", session);
LOG.debug("objectFactory={}", session.getContainerScope().getObjectFactory());
logger.debug("openSession({}) objectFactory={}", session, session.getContainerScope().getObjectFactory());
}
this.session = session;
this.session.getContainerScope().getObjectFactory().decorate(this.websocket);

View File

@ -22,7 +22,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.ByteBuffer;
import java.util.Objects;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.websocket.api.BatchMode;
@ -36,6 +38,7 @@ import org.eclipse.jetty.websocket.common.message.MessageReader;
import org.eclipse.jetty.websocket.common.message.NullMessage;
import org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage;
import org.eclipse.jetty.websocket.common.message.SimpleTextMessage;
import org.eclipse.jetty.websocket.common.util.TextUtil;
/**
* Handler for Annotated User WebSocket objects.
@ -45,12 +48,12 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
private static final Logger LOG = Log.getLogger(JettyAnnotatedEventDriver.class);
private final JettyAnnotatedMetadata events;
private boolean hasCloseBeenCalled = false;
private BatchMode batchMode;
private final BatchMode batchMode;
public JettyAnnotatedEventDriver(WebSocketPolicy policy, Object websocket, JettyAnnotatedMetadata events)
{
super(policy, websocket);
this.events = events;
this.events = Objects.requireNonNull(events, "JettyAnnotatedMetadata may not be null");
WebSocket anno = websocket.getClass().getAnnotation(WebSocket.class);
// Setup the policy
@ -71,6 +74,11 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
this.policy.setIdleTimeout(anno.maxIdleTime());
}
this.batchMode = anno.batchMode();
if (LOG.isDebugEnabled())
{
LOG.debug("ctor / object={}, policy={}, batchMode={}, events={}", websocket, policy, batchMode, events);
}
}
@Override
@ -82,20 +90,20 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onBinaryFrame(ByteBuffer buffer, boolean fin) throws IOException
{
if (events.onBinary == null)
if (LOG.isDebugEnabled())
{
// not interested in binary events
if (activeMessage == null)
{
activeMessage = NullMessage.INSTANCE;
}
return;
LOG.debug("onBinaryFrame({}, {}) - events.onBinary={}, activeMessage={}",
BufferUtil.toDetailString(buffer), fin, events.onBinary, activeMessage);
}
if (activeMessage == null)
{
if (events.onBinary.isStreaming())
if (events.onBinary == null)
{
// not interested in binary events
activeMessage = NullMessage.INSTANCE;
}
else if (events.onBinary.isStreaming())
{
final MessageInputStream inputStream = new MessageInputStream(session);
activeMessage = inputStream;
@ -126,6 +134,11 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onBinaryMessage(byte[] data)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onBinaryMessage([{}]) - events.onBinary={}", data.length, events.onBinary);
}
if (events.onBinary != null)
{
events.onBinary.call(websocket, session, data, 0, data.length);
@ -141,6 +154,12 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
return;
}
hasCloseBeenCalled = true;
if (LOG.isDebugEnabled())
{
LOG.debug("onClose({}) - events.onClose={}", close, events.onClose);
}
if (events.onClose != null)
{
events.onClose.call(websocket, session, close.getStatusCode(), close.getReason());
@ -150,6 +169,11 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onConnect()
{
if (LOG.isDebugEnabled())
{
LOG.debug("onConnect() - events.onConnect={}", events.onConnect);
}
if (events.onConnect != null)
{
events.onConnect.call(websocket, session);
@ -159,6 +183,11 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onError(Throwable cause)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onError({}) - events.onError={}", cause.getClass().getName(), events.onError);
}
if (events.onError != null)
{
events.onError.call(websocket, session, cause);
@ -172,6 +201,11 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onFrame(Frame frame)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onFrame({}) - events.onFrame={}", frame, events.onFrame);
}
if (events.onFrame != null)
{
events.onFrame.call(websocket, session, frame);
@ -181,6 +215,13 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onInputStream(InputStream stream)
{
Objects.requireNonNull(stream, "InputStream may not be null");
if (LOG.isDebugEnabled())
{
LOG.debug("onInputStream({}) - events.onBinary={}", stream.getClass().getName(), events.onBinary);
}
if (events.onBinary != null)
{
events.onBinary.call(websocket, session, stream);
@ -190,6 +231,13 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onReader(Reader reader)
{
Objects.requireNonNull(reader, "Reader may not be null");
if (LOG.isDebugEnabled())
{
LOG.debug("onReader({}) - events.onText={}", reader.getClass().getName(), events.onText);
}
if (events.onText != null)
{
events.onText.call(websocket, session, reader);
@ -199,19 +247,20 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onTextFrame(ByteBuffer buffer, boolean fin) throws IOException
{
if (events.onText == null)
if (LOG.isDebugEnabled())
{
// not interested in text events
if (activeMessage == null)
{
activeMessage = NullMessage.INSTANCE;
}
return;
LOG.debug("onTextFrame({}, {}) - events.onText={}, activeMessage={}",
BufferUtil.toDetailString(buffer), fin, events.onText, activeMessage);
}
if (activeMessage == null)
{
if (events.onText.isStreaming())
if (events.onText == null)
{
// not interested in text events
activeMessage = NullMessage.INSTANCE;
}
else if (events.onText.isStreaming())
{
MessageInputStream inputStream = new MessageInputStream(session);
activeMessage = new MessageReader(inputStream);
@ -243,6 +292,12 @@ public class JettyAnnotatedEventDriver extends AbstractEventDriver
@Override
public void onTextMessage(String message)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onTextMessage([{}] \"{}\") - events.onText={}",
message.length(), TextUtil.maxStringLength(60, message), events.onText);
}
if (events.onText != null)
{
events.onText.call(websocket, session, message);

View File

@ -24,27 +24,27 @@ import org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallab
public class JettyAnnotatedMetadata
{
/**
* &#064;OnWebSocketConnect ()
* {@code @OnWebSocketConnect ()}
*/
public CallableMethod onConnect;
/**
* &#064;OnWebSocketMessage (byte[], or ByteBuffer, or InputStream)
* {@code @OnWebSocketMessage (byte[], or ByteBuffer, or InputStream)}
*/
public OptionalSessionCallableMethod onBinary;
/**
* &#064;OnWebSocketMessage (String, or Reader)
* {@code @OnWebSocketMessage (String, or Reader)}
*/
public OptionalSessionCallableMethod onText;
/**
* &#064;OnWebSocketFrame (Frame)
* {@code @OnWebSocketFrame (Frame)}
*/
public OptionalSessionCallableMethod onFrame;
/**
* &#064;OnWebSocketError (Throwable)
* {@code @OnWebSocketError (Throwable)}
*/
public OptionalSessionCallableMethod onError;
/**
* &#064;OnWebSocketClose (Frame)
* {@code @OnWebSocketClose (Frame)}
*/
public OptionalSessionCallableMethod onClose;
@ -52,7 +52,8 @@ public class JettyAnnotatedMetadata
public String toString()
{
StringBuilder s = new StringBuilder();
s.append("JettyPojoMetadata[");
s.append(this.getClass().getSimpleName());
s.append("[");
s.append("onConnect=").append(onConnect);
s.append(",onBinary=").append(onBinary);
s.append(",onText=").append(onText);

View File

@ -22,7 +22,9 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.ByteBuffer;
import java.util.Objects;
import org.eclipse.jetty.util.BufferUtil;
import org.eclipse.jetty.util.Utf8StringBuilder;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@ -38,6 +40,7 @@ import org.eclipse.jetty.websocket.common.CloseInfo;
import org.eclipse.jetty.websocket.common.frames.ReadOnlyDelegatedFrame;
import org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage;
import org.eclipse.jetty.websocket.common.message.SimpleTextMessage;
import org.eclipse.jetty.websocket.common.util.TextUtil;
/**
* Handler for {@link WebSocketListener} based User WebSocket implementations.
@ -58,12 +61,26 @@ public class JettyListenerEventDriver extends AbstractEventDriver
public JettyListenerEventDriver(WebSocketPolicy policy, WebSocketConnectionListener listener)
{
super(policy, listener);
this.listener = listener;
this.listener = Objects.requireNonNull(listener, "Listener may not be null");
if (LOG.isDebugEnabled())
{
LOG.debug("ctor / listener={}, policy={}", listener.getClass().getName(), policy);
}
}
@Override
public void onBinaryFrame(ByteBuffer buffer, boolean fin) throws IOException
{
if (LOG.isDebugEnabled())
{
LOG.debug("onBinaryFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
BufferUtil.toDetailString(buffer), fin,
(listener instanceof WebSocketListener),
(listener instanceof WebSocketPartialListener),
listener.getClass().getName(),
activeMessage);
}
if (listener instanceof WebSocketListener)
{
if (activeMessage == null)
@ -98,6 +115,14 @@ public class JettyListenerEventDriver extends AbstractEventDriver
@Override
public void onBinaryMessage(byte[] data)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onBinaryMessage([{}]) - webSocketListener={}, listener={}",
data.length,
(listener instanceof WebSocketListener),
this.listener.getClass().getName());
}
if (listener instanceof WebSocketListener)
{
((WebSocketListener)listener).onWebSocketBinary(data, 0, data.length);
@ -116,6 +141,11 @@ public class JettyListenerEventDriver extends AbstractEventDriver
int statusCode = close.getStatusCode();
String reason = close.getReason();
if (LOG.isDebugEnabled())
{
LOG.debug("onClose({},{}) - listener={}", statusCode, reason, this.listener.getClass().getName());
}
listener.onWebSocketClose(statusCode, reason);
}
@ -123,19 +153,34 @@ public class JettyListenerEventDriver extends AbstractEventDriver
public void onConnect()
{
if (LOG.isDebugEnabled())
LOG.debug("onConnect({})", session);
{
LOG.debug("onConnect({}) - listener={}", session, this.listener.getClass().getName());
}
listener.onWebSocketConnect(session);
}
@Override
public void onError(Throwable cause)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onError({}) - listener={}", cause.getClass().getName(), this.listener.getClass().getName());
}
listener.onWebSocketError(cause);
}
@Override
public void onFrame(Frame frame)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onFrame({}) - frameListener={}, pingPongListener={}, listener={}",
frame,
(listener instanceof WebSocketFrameListener),
(listener instanceof WebSocketPingPongListener),
this.listener.getClass().getName());
}
if (listener instanceof WebSocketFrameListener)
{
((WebSocketFrameListener)listener).onWebSocketFrame(new ReadOnlyDelegatedFrame(frame));
@ -169,6 +214,17 @@ public class JettyListenerEventDriver extends AbstractEventDriver
@Override
public void onTextFrame(ByteBuffer buffer, boolean fin) throws IOException
{
if (LOG.isDebugEnabled())
{
LOG.debug("onTextFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
BufferUtil.toDetailString(buffer),
fin,
(listener instanceof WebSocketListener),
(listener instanceof WebSocketPartialListener),
listener.getClass().getName(),
activeMessage);
}
if (listener instanceof WebSocketListener)
{
if (activeMessage == null)
@ -226,6 +282,15 @@ public class JettyListenerEventDriver extends AbstractEventDriver
@Override
public void onTextMessage(String message)
{
if (LOG.isDebugEnabled())
{
LOG.debug("onTextMessage([{}] \"{}\") - webSocketListener={}, listener={}",
message.length(),
TextUtil.maxStringLength(60, message),
(listener instanceof WebSocketListener),
listener.getClass().getName());
}
if (listener instanceof WebSocketListener)
{
((WebSocketListener)listener).onWebSocketText(message);
@ -234,6 +299,16 @@ public class JettyListenerEventDriver extends AbstractEventDriver
public void onContinuationFrame(ByteBuffer buffer, boolean fin) throws IOException
{
if (LOG.isDebugEnabled())
{
LOG.debug("onContinuationFrame({}, {}) - webSocketListener={}, webSocketPartialListener={}, listener={}, activeMessage={}",
BufferUtil.toDetailString(buffer), fin,
(listener instanceof WebSocketListener),
(listener instanceof WebSocketPartialListener),
listener.getClass().getName(),
activeMessage);
}
if (listener instanceof WebSocketPartialListener)
{
switch (partialMode)

View File

@ -139,6 +139,9 @@ public class CallableMethod
@Override
public String toString()
{
return String.format("%s[%s]", this.getClass().getSimpleName(), method.toGenericString());
return String.format("%s[pojo=%s,method=%s]",
this.getClass().getSimpleName(),
pojo.getName(),
method.toGenericString());
}
}

View File

@ -86,6 +86,11 @@ public class OptionalSessionCallableMethod extends CallableMethod
@Override
public String toString()
{
return String.format("%s[%s]", this.getClass().getSimpleName(), method.toGenericString());
return String.format("%s[pojo=%s,method=%s,wantsSession=%b,streaming=%s]",
this.getClass().getSimpleName(),
pojo.getName(),
method.toGenericString(),
wantsSession,
streaming);
}
}

View File

@ -28,13 +28,17 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.servlet.ListenerHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
import org.eclipse.jetty.servlet.Source;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.StacklessLogging;
@ -56,7 +60,62 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
public class CreationTest
{
static ThreadLocal<HttpServletRequest> currentRequest = new ThreadLocal<>();
@Test
public void testRequestGetSessionInsideListener() throws Exception
{
String contextPath = "";
String servletMapping = "/server";
DefaultSessionCacheFactory cacheFactory = new DefaultSessionCacheFactory();
cacheFactory.setEvictionPolicy(SessionCache.EVICT_ON_SESSION_EXIT);
SessionDataStoreFactory storeFactory = new TestSessionDataStoreFactory();
TestServer server1 = new TestServer(0, -1, -1, cacheFactory, storeFactory);
TestServlet servlet = new TestServlet();
ServletHolder holder = new ServletHolder(servlet);
ServletContextHandler contextHandler = server1.addContext(contextPath);
ListenerHolder h = contextHandler.getServletHandler().newListenerHolder(Source.EMBEDDED);
h.setListener(new MySessionListener());
contextHandler.getServletHandler().addListener(h);
TestHttpChannelCompleteListener scopeListener = new TestHttpChannelCompleteListener();
server1.getServerConnector().addBean(scopeListener);
contextHandler.addServlet(holder, servletMapping);
servlet.setStore(contextHandler.getSessionHandler().getSessionCache().getSessionDataStore());
server1.start();
int port1 = server1.getPort();
try (StacklessLogging stackless = new StacklessLogging(Log.getLogger("org.eclipse.jetty.server.session")))
{
HttpClient client = new HttpClient();
client.start();
//make a session
String url = "http://localhost:" + port1 + contextPath + servletMapping + "?action=create&check=false";
CountDownLatch synchronizer = new CountDownLatch(1);
scopeListener.setExitSynchronizer(synchronizer);
//make a request to set up a session on the server
ContentResponse response = client.GET(url);
assertEquals(HttpServletResponse.SC_OK, response.getStatus());
String sessionCookie = response.getHeaders().get("Set-Cookie");
assertTrue(sessionCookie != null);
//ensure request has finished being handled
synchronizer.await(5, TimeUnit.SECONDS);
}
finally
{
server1.stop();
}
}
/**
* Test creating a session when the cache is set to
* evict after the request exits.
@ -387,6 +446,21 @@ public class CreationTest
}
}
public static class MySessionListener implements HttpSessionListener
{
@Override
public void sessionCreated(HttpSessionEvent se)
{
currentRequest.get().getSession(true);
}
@Override
public void sessionDestroyed(HttpSessionEvent se)
{
}
}
public static class TestServlet extends HttpServlet
{
private static final long serialVersionUID = 1L;
@ -436,6 +510,7 @@ public class CreationTest
}
else if (action != null && action.startsWith("create"))
{
currentRequest.set(request);
HttpSession session = request.getSession(true);
_id = session.getId();
session.setAttribute("value", new Integer(1));