Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Running Jetty-6.1.x

Running jetty6 is as simple as going to your jetty installion directory and typing:

Code Block
java -jar start.jar etc/jetty.xml

This will start jetty and deploy a demo webapp available at:

Code Block


The part of the runline following -jar start.jar specifies the names of configuration files. These files instruct jetty which ports to listen on, which webapps to deploy, and generally configure all container-related customizable settings. You may have only one configuration file, or you may have many, depending on your needs. More on this later.

The etc/jetty.xml file that is provided in the distribution includes many examples of alternative configuration settings that can be uncommented. For your convenience, this configuration instructs jetty to deploy all webapps found in the webapps directory. Therefore, in order to deploy a new webapp, you need not do anything more than drop your war file or unpacked war file into the webapps directory.


Apart from stopping jetty with a cntrl-c in the same terminal window as you started it, you can
start Jetty so that it listens on a local port for stop commands:

Code Block
 java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar 

The server can then be stopped using a different terminal window on the same machine:

Code Block
 java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --stop 

If the STOP.KEY property is ommitted from the start command, then a random key is printed on standard out. If the STOP.PORT is set to 0, a random available port is assigned and printed on stdout.

See also Securing Jetty.

Contact the core Jetty developers at
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 from 1 day to full product delivery