What is this ?
- mvn ( preferably at least 2.0.4 )
- jdk 1.6
Obtaining the Source
The project uses Subversion as it's source code control system.
The source can be checked out anonymously using:
The project uses maven2 as its build tool.
Go to the top level directory of the project and type:
This will build jetty6 locally, copy the jars and artifacts into the correct directories and put snapshot versions of the artifacts into your local maven repository.
Copy the freshly-built j2se6-6.1-SNAPSHOT.jar archive to $JETTY_HOME/lib/ext. As long as this JAR is on the classpath, the JVM should pick up the Jetty implementation instead of the default one.
By default, an independent Jetty server will be started no matter if there is already an instance running. This is a good choice if you just want to write a standalone application publishing web services via Jetty's web stack.
You can however tell the provider to reuse an existing server by setting the static server property on the provider's implementation in the jetty.xml configuration file:
You absolutely need to have a
ContextHandlerCollection in your servers handlers chain. Here's an example one, extracted from the default jetty.xml:
The provider will then add new contexts to the specified server eventually binding a new Connector if the port specified in the endpoint is not yet bound by Jetty.