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
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:
To run with JSP suppport:
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
webappsdirectory where it is discovered by the WebAppDeployer - placing a desciptor in the
contextsdirectory 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.