Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Starting/Installing Jetty-7.0.x"

Line 19: Line 19:
 
* J2SE 1.5 or [http://java.sun.com/javase/downloads/index.jsp greater]
 
* J2SE 1.5 or [http://java.sun.com/javase/downloads/index.jsp greater]
  
== Downloading the Binaries ==
+
== Downloading and Installing the Jetty Core Components Binary ==
  
The Jetty core component binaries can be found on the [http://www.eclipse.org/jetty/downloads.php Jetty downloads page]. Other available binaries and packages for download are listed on [[Jetty/Getting_Started/Downloading_Jetty|Downloading Jetty]].
+
=== Download the Binary ===
  
=== Inspecting the Distribution ===
+
The Jetty core component binaries can be found on the [http://www.eclipse.org/jetty/downloads.php Jetty downloads page].
 +
 
 +
=== Unpack the Binary ===
 +
 
 +
Unzip the binary; it will be extracted into a directory called jetty-distribution-<var>VERSION</var>. The rest of the instructions in this wiki will refer to this location as <var>$JETTY_HOME</var>.
 +
 
 +
=== Inspect the Distribution ===
  
 
Unzip the distribution you just downloaded. The top-level directory should look like:
 
Unzip the distribution you just downloaded. The top-level directory should look like:
Line 50: Line 56:
 
</div>
 
</div>
  
== Downloading the Source Code ==
 
  
Check out the source code using SVN:
+
== Starting Jetty ==
  
* [http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/ Jetty 7 core components]
+
To start Jetty, open the command shell, and:
* [http://svn.codehaus.org/jetty/jetty/trunk/ Jetty 7 additional accessories and integrations]
+
  
<!-- TODO: perhaps link to a page on the contributor guide, or link to building the source -->
+
cd $JETTY_HOME
 +
java -jar start.jar
  
<!--
 
== Testing the Installation ==
 
== Starting Jetty ==
 
 
== Stopping Jetty ==
 
== Stopping Jetty ==
 +
 +
From the command shell where Jetty is running, type <tt><ctrl-c></tt>
 +
 +
== Testing Jetty ==
 +
 +
When Jetty starts, it deploys a test web application on port 8080.  To check if Jetty is running properly navigate to the <var>test</var> URL from a browser. For example:
 +
 +
http://localhost:8080/test
 +
 +
{{note
 +
|If you started Jetty on another host, substitute that host name for <var>localhost</var>. If you used a different port number you will also need to change <var>8080</var> to the correct number. Unless otherwise noted, the rest of the instructions in this wiki will assume that you are using <var>localhost</var> and port <var>8080</var>.
 +
}}
 +
 
== Configuring Jetty ==
 
== Configuring Jetty ==
 +
 +
[[Jetty/Configuration|Configuration Documentation]]
 +
<!-- add more detail! -->
 +
 
== Deploying Web Applications ==
 
== Deploying Web Applications ==
-->
+
 
 +
The default installation of Jetty is configured to deploy webapps by looking in two places: <tt>$JETTY_HOME/webapps</tt> and <tt>$JETTY_HOME/contexts</tt>.
 +
 
 +
You can put your standard webapps in <tt>$JETTY_HOME/webapps</tt>, where it will be discovered at startup; it does not support hot deployment. For non-standard contexts, or if you need to support hot deployment, put your configuration files into <tt>$JETTY_HOME/contexts</tt>.
 +
 
 +
{{note
 +
|The easiest way to make your webapp the root context (/) is to name it "root.war".
 +
}}
 +
 
 +
== Downloading Other Binaries ==
 +
 
 +
Other available binaries and packages for download are listed on [[Jetty/Getting_Started/Downloading_Jetty|Downloading Jetty]].
 +
 
 +
== Obtaining and Building from Source ==
 +
 
 +
You can also build Jetty from the source code.
 +
 
 +
Check out the source code using SVN:
 +
 
 +
* [http://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/ Jetty 7 core components]
 +
* [http://svn.codehaus.org/jetty/jetty/trunk/ Jetty 7 additional accessories and integrations]
 +
 
 +
Follow the rest of the instructions on [[Building from Source]].

Revision as of 03:54, 19 June 2009



Introduction

The following provides detailed instructions for downloading and installing the latest version of Jetty 7. If you just want to get up and running, see the Quick Start Guide.

Prerequisites

Hardware

  • ~7 MB of disk space for Jetty source
  • ~7 MB for Jetty 7 binaries

Operating System

  • Any operating system that supports J2SE 1.5 or greater.

Environment

Downloading and Installing the Jetty Core Components Binary

Download the Binary

The Jetty core component binaries can be found on the Jetty downloads page.

Unpack the Binary

Unzip the binary; it will be extracted into a directory called jetty-distribution-VERSION. The rest of the instructions in this wiki will refer to this location as $JETTY_HOME.

Inspect the Distribution

Unzip the distribution you just downloaded. The top-level directory should look like:

about.html  contexts            etc             javadoc  LICENSE-APACHE-2.0.txt    logs      notice.html  resources  webapps
bin         contexts-available  INCUBATION.txt  lib      LICENSE-ECLIPSE-1.0.html  META-INF  README.txt   start.jar
about.html 
"About This Content" page from Eclipse
bin 
directory for shell scripts to help automate the building and running of Jetty
contexts 
hot deploy directory
contexts-available 
directory for additional example contexts
etc 
directory for Jetty configuration files
INCUBATION.TXT 
README explaining Jetty's current incubation status within the Eclipse project
javadoc 
contains the javadoc; needs to be built first
lib 
contains all the JAR files necessary to run jetty-7
LICENSE-APACHE-2.0.TXT 
license file for Jetty (Jetty 7 is dual-licensed)
LICENSE-ECLIPSE-1.0.HTML 
license file for Jetty (Jetty 7 is dual-licensed)
logs 
directory for request logs
META-INF 
for packaging
notice.html 
licenses applicable to Jetty, as well as any exceptions
README.TXT 
contains useful getting started information
resources 
directory containing additional resources for configuration
start.jar 
JAR which invokes jetty-7 (see also Running Jetty)
webapps 
directory containing webapps which will be run under the default configuration of Jetty; contains demo webapps


Starting Jetty

To start Jetty, open the command shell, and:

cd $JETTY_HOME
java -jar start.jar

Stopping Jetty

From the command shell where Jetty is running, type <ctrl-c>

Testing Jetty

When Jetty starts, it deploys a test web application on port 8080. To check if Jetty is running properly navigate to the test URL from a browser. For example:

http://localhost:8080/test
Note.png
If you started Jetty on another host, substitute that host name for localhost. If you used a different port number you will also need to change 8080 to the correct number. Unless otherwise noted, the rest of the instructions in this wiki will assume that you are using localhost and port 8080.


Configuring Jetty

Configuration Documentation

Deploying Web Applications

The default installation of Jetty is configured to deploy webapps by looking in two places: $JETTY_HOME/webapps and $JETTY_HOME/contexts.

You can put your standard webapps in $JETTY_HOME/webapps, where it will be discovered at startup; it does not support hot deployment. For non-standard contexts, or if you need to support hot deployment, put your configuration files into $JETTY_HOME/contexts.

Note.png
The easiest way to make your webapp the root context (/) is to name it "root.war".


Downloading Other Binaries

Other available binaries and packages for download are listed on Downloading Jetty.

Obtaining and Building from Source

You can also build Jetty from the source code.

Check out the source code using SVN:

Follow the rest of the instructions on Building from Source.

Back to the top