=== ECLIPSE JETTY

The link:https://jetty.org/[Eclipse Jetty] Project provides a:

* Java HTTP (HTTP/1.1, HTTP/2 and HTTP/3) Server and Client
* Jakarta EE Servlet Container
* Java WebSocket Server and Client

Jetty is available under an open source link:LICENSE.txt[license], and the full source code is available at link:https://github.com/jetty/jetty.project[GitHub].

The Jetty documentation is available at link:https://jetty.org/docs/[].

// tag::quick[]
==== Quick Setup

Jetty is distributed in an artifact that expands in a directory called `$JETTY_HOME`, which should not be modified.

Configuration for Jetty is typically done in a directory called `$JETTY_BASE`.
There may be more than one `$JETTY_BASE` directories with different configurations.

Jetty supports the deployment of EE8, EE9 and EE10 standard web applications, as well as the deployment of Jetty-specific web applications.

For example, the following commands can be used to set up a `$JETTY_BASE` directory that supports deployment of EE10 `+*.war+` files and a clear-text HTTP connector:

----
$ export JETTY_HOME=/path/to/jetty-home
$ mkdir /path/to/jetty-base
$ cd /path/to/jetty-base
$ java -jar $JETTY_HOME/start.jar --add-modules=server,http,ee10-deploy
----

The last command creates a `$JETTY_BASE/start.d/` directory and other directories that contain the configuration of the server, including the `$JETTY_BASE/webapps/` directory, in which standard EE10 `+*.war+` files can be deployed.

To deploy Jetty's demo web applications, run this command:

----
$ java -jar $JETTY_HOME/start.jar --add-module=demos
----

Now you can start the Jetty server with:

----
$ java -jar $JETTY_HOME/start.jar
----

Point your browser at `+http://localhost:8080+` to see the demo web applications deployed in Jetty.

The Jetty server can be stopped with `ctrl+c` in the terminal window.
// end::quick[]

For more information about how to start Jetty, you can read the link:https://jetty.org/docs/[documentation], or run this command:

----
$ java -jar $JETTY_HOME/start.jar --help
----
