blob: 907bc196b983870ceae2df0e9925dab0ce7b9a86 [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter&nbsp;2.&nbsp;Using Jetty</title><link rel="stylesheet" type="text/css" href="css/docbook.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><meta name="keywords" content="jetty, servlet, servlet-api, cometd, http, websocket, eclipse, maven, java, server, software"><link rel="home" href="index.html" title="Jetty"><link rel="up" href="quick-start.html" title="Part&nbsp;I.&nbsp;Getting Started With Jetty"><link rel="prev" href="quickstart-jetty-coordinates.html" title="Finding Jetty in Maven"><link rel="next" href="quickstart-running-jetty.html" title="Running Jetty"><link xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" rel="shortcut icon" href="images/favicon.ico"><link rel="stylesheet" href="css/highlighter/foundation.css"><script src="js/highlight.pack.js"></script><script>
hljs.initHighlightingOnLoad();
</script><link type="text/css" rel="stylesheet" href="css/font-awesome/font-awesome.min.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><tr><td style="width: 25%"><a href="http://www.eclipse.org/jetty"><img src="images/jetty-header-logo.png" alt="Jetty Logo"></a><br><span style="font-size: small">
Version: 9.3.28.v20191105</span></td><td style="width: 50%"></td></tr></table><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter&nbsp;2.&nbsp;Using Jetty</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="quickstart-jetty-coordinates.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;I.&nbsp;Getting Started With Jetty<br><a accesskey="p" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></th><td width="20%" align="right">&nbsp;<a accesskey="n" href="quickstart-running-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr></table><hr></div><div xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times" class="jetty-callout"><h5 class="callout"><a href="http://www.webtide.com/">Contact the core Jetty developers at
<span class="website">www.webtide.com</span></a></h5><p>
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ...
scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development
</p></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="quick-start-getting-started"></a>Chapter&nbsp;2.&nbsp;Using Jetty</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="quick-start-getting-started.html#jetty-downloading">Downloading Jetty</a></span></dt><dt><span class="section"><a href="quickstart-running-jetty.html">Running Jetty</a></span></dt><dt><span class="section"><a href="quickstart-deploying-webapps.html">Deploying Web Applications</a></span></dt></dl></div><p>You can use Jetty in many different ways ranging from embedding Jetty in applications, launching it from different build systems, from different JVM-based languages, or as a standalone distribution.
This guide covers the latter, a standalone distribution suitable for deploying web applications.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="jetty-downloading"></a>Downloading Jetty</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="quick-start-getting-started.html#_downloading_the_jetty_distribution">Downloading the Jetty Distribution</a></span></dt><dt><span class="section"><a href="quick-start-getting-started.html#distribution-content">Distribution Content</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_downloading_the_jetty_distribution"></a>Downloading the Jetty Distribution</h3></div></div></div><p>The standalone Jetty distribution is available for download from the Eclipse Foundation:</p><div class="blockquote"><blockquote class="blockquote"><p><span class="strong"><strong>Jetty</strong></span>
<a class="link" href="http://download.eclipse.org/jetty" target="_top">http://download.eclipse.org/jetty</a></p></blockquote></div><p>It is available in both zip and gzip formats; download the one most appropriate for your system.
Notice that there are a number of other files with extensions of .sha or .md5 which are checksum files.
When you download and unpack the binary, it is extracted into a directory called <code class="literal">jetty-distribution-VERSION.</code>
Put this directory in a convenient location.
The rest of the instructions in this documentation refer to this location as either <code class="literal">JETTY_HOME</code> or as <code class="literal">$(jetty.home).</code></p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="distribution-content"></a>Distribution Content</h3></div></div></div><p>A quick rundown of the distribution&#8217;s contents follows. The top-level directory contains:</p><div class="table"><a name="d0e1083"></a><p class="title"><b>Table&nbsp;2.1.&nbsp;Contents</b></p><div class="table-contents"><table class="table" summary="Contents" border="1" width="80%"><colgroup><col class="col_1"><col class="col_2"></colgroup><thead><tr><th align="left" valign="top">Location</th><th align="left" valign="top">Description</th></tr></thead><tbody><tr><td align="left" valign="top"><p>license-eplv10-aslv20.html</p></td><td align="left" valign="top"><p>License file for Jetty</p></td></tr><tr><td align="left" valign="top"><p>README.txt</p></td><td align="left" valign="top"><p>Useful getting started information</p></td></tr><tr><td align="left" valign="top"><p>VERSION.txt</p></td><td align="left" valign="top"><p>Release information</p></td></tr><tr><td align="left" valign="top"><p>bin/</p></td><td align="left" valign="top"><p>Utility shell scripts to help run Jetty on Unix systems</p></td></tr><tr><td align="left" valign="top"><p>demo-base/</p></td><td align="left" valign="top"><p>A Jetty base directory to run a Jetty server with demonstration webapps</p></td></tr><tr><td align="left" valign="top"><p>etc/</p></td><td align="left" valign="top"><p>Directory for Jetty XML configuration files</p></td></tr><tr><td align="left" valign="top"><p>lib/</p></td><td align="left" valign="top"><p>All the JAR files necessary to run Jetty</p></td></tr><tr><td align="left" valign="top"><p>logs/</p></td><td align="left" valign="top"><p>Directory for request logs</p></td></tr><tr><td align="left" valign="top"><p>modules/</p></td><td align="left" valign="top"><p>Directory of module definitions</p></td></tr><tr><td align="left" valign="top"><p>notice.html</p></td><td align="left" valign="top"><p>License information and exceptions</p></td></tr><tr><td align="left" valign="top"><p>resources/</p></td><td align="left" valign="top"><p>Directory containing additional resources for classpath, activated via configuration</p></td></tr><tr><td align="left" valign="top"><p>start.d/</p></td><td align="left" valign="top"><p>Directory of *.ini files containing arguments that are added to the effective command line (see start.ini)</p></td></tr><tr><td align="left" valign="top"><p>start.ini</p></td><td align="left" valign="top"><p>File containing the arguments that are added to the effective command line (modules, properties and XML configuration files)</p></td></tr><tr><td align="left" valign="top"><p>start.jar</p></td><td align="left" valign="top"><p>Jar that invokes Jetty (see also <a class="xref" href="quickstart-running-jetty.html" title="Running Jetty">Running Jetty</a>)</p></td></tr><tr><td align="left" valign="top"><p>webapps/</p></td><td align="left" valign="top"><p>Directory containing webapps that run under the default configuration of Jetty</p></td></tr></tbody></table></div></div><br class="table-break"></div></div></div><script type="text/javascript">
SyntaxHighlighter.all()
</script><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="quickstart-jetty-coordinates.html"><i class="fa fa-chevron-left" aria-hidden="true"></i> Previous</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="quick-start.html"><i class="fa fa-chevron-up" aria-hidden="true"></i> Top</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="quickstart-running-jetty.html">Next <i class="fa fa-chevron-right" aria-hidden="true"></i></a></td></tr><tr><td width="40%" align="left" valign="top">Finding Jetty in Maven&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></td><td width="40%" align="right" valign="top">&nbsp;Running Jetty</td></tr></table></div><p xmlns:jfetch="java:org.eclipse.jetty.xslt.tools.JavaSourceFetchExtension" xmlns:fetch="java:org.eclipse.jetty.xslt.tools.SourceFetchExtension" xmlns:d="http://docbook.org/ns/docbook" xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" xmlns:xslthl="http://xslthl.sf.net" xmlns:gcse="http://www.google.com" xmlns:date="http://exslt.org/dates-and-times"><div class="jetty-callout">
See an error or something missing?
<span class="callout"><a href="http://github.com/eclipse/jetty.project">Contribute to this documentation at
<span class="website"><i class="fa fa-github" aria-hidden="true"></i> Github!</span></a></span><span style="float: right"><i>(Generated: 2019-11-05)</i></span></div></p></body></html>