Using the Start.jar
The easiest way to start jetty, is to use the start.jar that comes with the distribution.
[jetty-distribution-7.0.0.M3]$ java -jar start.jar
Command Line Options
$ java -jar start.jar --help Usage: java -jar start.jar [--help|--stop|--version] [OPTIONS=option,...] [name=value ...] [config ...]
Command Line Option Help
- Help / Usage Information
- Stop the actively running Jetty Server (started with a previous use of start.jar)
- Show the version information about Jetty
- OPTIONS allows you to specify the jetty classpath entries that you want to use when starting up Jetty.
- OPTIONS lets you specify which bits and pieces of Jetty you want to use.
- Default OPTIONS set is "default,*
- NOTE: the "*" Option is always appended to the OPTIONS list.
Command Line Option Modes
- Special mode for various required entries. (always present)
- Special mode name that includes all resources found in the following other modes
- Default mode of operation, includes dependencies to run the core Server with Servlet API, WebApp, Continuations, Deployment, Security, and a collection of useful Jetty Servlet Filters. (see Jetty/Servlets for more info)
- Also includes the /lib/ext/ and /resources/ folders into the classpath
- Similar to 'default mode, with the addition of being able to configure the Jetty Server via XML configurations, and removal of /lib/ext/ and /resources/ folders.
- A meta mode that simply adds the contents of the /lib/ext/ folder to the classpath.
- A meta mode that adds the /resources/ folder to the classpath.
- Adds XML Configuration Support.
- Adds Authorization and Authentication Support.
- Adds Servlet Support via a ServletContext and a DefaultServlet implementation.
- Adds WebApp (WAR File) Support
- Adds Context and WebApp (WAR File) Deployer support
- Adds various useful Servlet Filters and Servlet Implementations (DoS, Gzip, Put, UserAgent, QoS, Multipart, Proxy, etc...)
- Adds jetty handler support for rewriting and redirecting requests based on rules.
- Adds JMX Support
- Adds Apache JServ Protocol version 1.3 Support
- Adds Simple Logging Facade for Java Support
- Adds JSP Support
- Adds JSP Support (Identical to jsp mode.)
- Adds JAAS and JNDI Support
- Adds Java Annotations Support to WebApps and Servlets for configuring themselves
- Adds the Jetty Async HTTP Client Support for Handlers, WebApps, and Servlets to use to initiate outgoing HTTP connections.
- Adds SecurityManager Policy Support.
Alternative Startup Techniques
Jetty can be configured and started as an embedded Web App Server from within another Java program. See Embedded Jetty for more details.
Eclipse can be started up from within Eclipse using a variety of techniques, see Use Jetty with Eclipse IDE for details.