You can download Jetty as a distribution bundle, a Maven dependency, an OSGi bundle, or install it via a Debian/RPM distribution. When you download and unpack the binary, it is extracted into a directory called jetty-distribution-<var>VERSION</var>. Put this directory into a convenient location. The rest of the instructions in this wiki will refer to this location as either <tt>JETTY_HOME</tt> or as <tt>$(jetty.home)</tt>.

The individual Jetty modules are also available as Maven artefacts under the [http://repo2.maven.org/maven2/org/eclipse/jetty org.eclipse.jetty] and [http://repo2.maven.org/maven2/org/mortbay/jetty org.mortbay.jetty] group IDs. See [[Jetty/Howto/Use Jetty with Maven]] for more details.

The individual Jetty modules are also available as Maven artefacts under the [http://repo2.maven.org/maven2/org/eclipse/jetty org.eclipse.jetty] and [http://repo2.maven.org/maven2/org/mortbay/jetty org.mortbay.jetty] group IDs. See [[Jetty/Howto/Use Jetty with Maven]] for more details.

Each jetty module has an equivalent jar containing the sources for that module. These sources jars have the same name as the binary jar, but with a "-sources" qualifier. These can be found on the maven repository at http://repo2.maven.org/maven2/org/eclipse/jetty in the relevant jetty module directories.

+

+

Additionally, we provide some handy binary and source jars that contain a useful mixture of classes. The list of these aggregate jars is at http://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/.

* webapps : directory containing webapps which will be run under the default configuration of Jetty; contains demo webapps

+

+

=== Starting and Stopping ===

+

+

To start:

+

+

<source lang="bash">

+

/etc/init.d/jetty start

+

</source>

+

+

To stop:

+

+

<source lang="bash">

+

/etc/init.d/jetty stop

+

</source>

+

+

Other commands:

+

+

<source lang="bash">

+

/etc/init.d/jetty help

+

</source>

+

+

==== Using setuid ====

+

+

When using the [[Jetty/Howto/Port80#Configuring_Jetty.27s_SetUID_feature | setuid feature]] you need to ensure that the $JETTY_HOME/etc/jetty-setuid.xml file is first on the list of xml files to execute. To do this, edit the $JETTY_HOME/etc/jetty.conf file and insert the line "--pre=etc/jetty-setuid.xml" before "--pre=etc/jetty-logging.xml". Like this:

You can download Jetty as a distribution bundle, a Maven dependency, an OSGi bundle, or install it via a Debian/RPM distribution. When you download and unpack the binary, it is extracted into a directory called jetty-distribution-VERSION. Put this directory into a convenient location. The rest of the instructions in this wiki will refer to this location as either JETTY_HOME or as $(jetty.home).

OSGi Update Repositories

Source Download

Each jetty module has an equivalent jar containing the sources for that module. These sources jars have the same name as the binary jar, but with a "-sources" qualifier. These can be found on the maven repository at http://repo2.maven.org/maven2/org/eclipse/jetty in the relevant jetty module directories.

webapps : directory containing webapps which will be run under the default configuration of Jetty; contains demo webapps

Starting and Stopping

To start:

/etc/init.d/jetty start

To stop:

/etc/init.d/jetty stop

Other commands:

/etc/init.d/jetty help

Using setuid

When using the setuid feature you need to ensure that the $JETTY_HOME/etc/jetty-setuid.xml file is first on the list of xml files to execute. To do this, edit the $JETTY_HOME/etc/jetty.conf file and insert the line "--pre=etc/jetty-setuid.xml" before "--pre=etc/jetty-logging.xml". Like this:

# ========================================================# jetty.conf Configuration for jetty.sh script# --------------------------------------------------------# This file is used by the jetty.sh script to provide # extra configuration arguments for the start.jar command# created by that script.# # Each line in this file becomes an argument to start.jar# unless this file contains an --ini option, then these# arguments will be in addition to those found in the# start.ini file# =======================================================--pre=etc/jetty-setuid.xml
--pre=etc/jetty-logging.xml