Skip to main content
Jump to: navigation, search

Jetty/Starting/Quick Start Guide

< Jetty‎ | Starting
Revision as of 02:39, 12 August 2009 by Athena.webtide.com (Talk | contribs) (note/warning template)


Introduction

The following provides quick instructions for downloading, installing, and running the latest binary version of Jetty 7. If you're looking for Jetty packaged in other formats, look up How to Install Jetty.

Prerequisites

Hardware

  • 7.1 MB of disk space for Jetty source
  • 7.3 MB for Jetty 7 binaries

Operating System

  • Any operating system that supports J2SE 1.5 or greater.

Environment

Download and Unpack

  1. Download the latest Jetty from Eclipse. From the download site, select the version you want and follow the prompts to Save it on your system.
  2. Unzip it into a directory of your choice. Now it is ready to start running.

Starting Jetty

To start Jetty open a command shell, go to your Jetty installation directory, and type:

java -jar start.jar

This starts Jetty running on port 8080.

Warning2.png
Jetty will not start if another process is using port 8080
The port number can be changed by editing the $JETTY_HOME/etc/jetty.xml file. Please see the #Setting Jetty's Port section below or for more details see How to Configure Jetty. The rest of the instructions in this wiki will assume that you are using port 8080


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 localhost from a browser. For example:

http://localhost:8080/
Note.png
Port and host defaults
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


Setting Jetty's Port

To change Jetty's default port, edit $JETTY_HOME/etc/jetty.xml and change the port number in this line, then start Jetty:

<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>

Alternatively you can set the port on the command line. Please see How to Configure Jetty for more details.

Additional Resources

Back to the top