Jetty has moved!
Jetty is a project at the Eclipse Foundation.
Homepage:http://www.eclipse.org/jetty
Downloads: http://download.eclipse.org/jetty/
Documentation:http://www.eclipse.org/jetty/documentation/current/
About:http://www.eclipse.org/jetty/about.php
Jetty Powered:http://www.eclipse.org/jetty/powered/
Contact the core Jetty developers at www.webtide.com
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
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Running

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

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

Configuration

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.

Hot Deployment

Icon

jetty6 will not hot-deploy webapps after it has started. You must stop and then restart jetty6 to pick up the new webapp. If you are interested in using hot-deployment, take a look at the jetty6 maven2 plugin.

Stopping

Apart from stopping jetty with a cntrl-c in the same terminal window as you started it, you can use the following command in a different terminal window:

This will stop a jetty instance that was started by a command such as the one in the Running section. Whenever jetty starts up, it opens up a port (by default this is port 8079) and starts a thread to listen for "stop" messages. The "--stop" argument to a second invocation of jetty tells that instance to send the "stop" message on a port (again, by default this will be port 8079).

If you need to change the port on which jetty listens for stop messages, for example because that port is already in use or perhaps you want to run multiple instances of jetty, you use the system property STOP.PORT:

Additionally, if you want to protect against accidental or unauthorized stops, you can ask jetty to generate and print a special random key when starting that must also be provided in order to stop it:

  • No labels
Contact the core Jetty developers at www.webtide.com
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