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 4 Next »

Running Jetty-7.0.x

From an unpacked release directory of jetty-7, the server can be started with the command:

This will start a HTTP server on port 8080 and deploy the test web application at:

Configuration

The default configuration of jetty is in the etc/jetty.xml file (see Syntax Reference), which configures the HTTP connectors, web application deployers and other server components (see Configuring Jetty). The configuration file may be directly invoked with:

Jetty Configuration files are additive and multiple can be specified on the command line to activate and configure additional features. For example, to add an SSL listener to jetty:

The etc directory has many such extra configuration file examples.

Options

The start.jar command is responsible for creating the java classpath and executing the server with your configuration. By default, some options are not placed on the classpath and the -DOPTION parameter is needed to add additional libraries to the classpath. To see the options available use the command:

Once one option is specified, the default options are no longer added and all options used must be listed. For example to run jetty with jmx:

For simplicity, the option Server is defined to mean the server option and all it's common dependencies and associates. So the above jmx example can be simplified to:

Deploying web applications

Web applications may be deployed by either:

  • directly configuring them in the jetty.xml or other configuration file
  • placing the war in the webapps directory where it is discovered by the WebAppDeployer
  • placeing a desciptor in the contexts directory where it is discovered by the ContextDeployer

The default jetty.xml file configures both a webapp and a contexts deployer, so it is usually sufficient just to drop your WAR file into the webapps directory before starting the server.

Stopping

Use ctrl-C to stop the server.

  • 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