Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Run Jetty"

< Jetty‎ | Howto
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Jetty Howto
 
{{Jetty Howto
| introduction = This howto covers how to start up Jetty as standalone, and links to pages which cover alternative methods of startup.
+
| introduction =  
 +
 
 +
{{Jetty Redirect|http://www.eclipse.org/jetty/documentation/current/quickstart-running-jetty.html}}
 +
 
 +
This howto covers how to start up Jetty as standalone, and links to pages which cover alternative methods of startup.
 
| steps =
 
| steps =
 
===Standalone Startup===
 
===Standalone Startup===
Line 11: Line 15:
 
java -jar start.jar
 
java -jar start.jar
 
</source>
 
</source>
 +
 +
The default options may be specified in the start.ini file, or if that is not present, they are defined in the start.config file that is within the start.jar.
  
 
To see the command line options for start.jar and help text for start.jar use:
 
To see the command line options for start.jar and help text for start.jar use:
 
<source lang="bash">
 
<source lang="bash">
$ java -jar start.jar --help
+
java -jar start.jar --help
 
</source>
 
</source>
  
 
For a full description of start.jar features see [[Jetty/Feature/Start.jar|Jetty Start.jar Feature Guide]].
 
For a full description of start.jar features see [[Jetty/Feature/Start.jar|Jetty Start.jar Feature Guide]].
 +
 +
====More start.jar examples ====
 +
 +
To run jetty with all options enabled:
 +
 +
<source lang="bash"> 
 +
java -jar start.jar OPTIONS=All
 +
</source>
 +
 +
To run with JSP support (if available)
 +
 +
<source lang="bash">
 +
java -jar start.jar OPTIONS=Server,jsp
 +
</source>
 +
 +
To run with JMX support
 +
 +
<source lang="bash">
 +
java -jar start.jar OPTIONS=Server,jmx etc/jetty-jmx.xml etc/jetty.xml
 +
</source>
 +
 +
To run with JSP & JMX support
 +
 +
<source lang="bash">
 +
java -jar start.jar OPTIONS=Server,jsp,jmx etc/jetty-jmx.xml etc/jetty.xml
 +
</source>
 +
  
  
Line 23: Line 56:
  
 
====Embedded Startup====
 
====Embedded Startup====
Jetty can be configured and started as an embedded webapp server from within another Java program. See [[Jetty/Howto/Embed Jetty|How to Embed Jetty]] for more details.
+
Jetty can be configured and started as an embedded webapp server from within another Java program. See [[Jetty/Tutorial/Embedding_Jetty|Embedding Jetty Tutoral]] for more details.  Once you have a main that runs Jetty, it is very easy to run this from your IDE, debugger and/or profiler.
  
 
====Eclipse Startup====
 
====Eclipse Startup====
  
Eclipse can be started up from within Eclipse using a variety of techniques; see [[Jetty/Howto/Use Jetty with Eclipse|How to Use Jetty with Eclipse IDE]] for details.
+
Jetty can be started up from within Eclipse using a variety of techniques; see [[Jetty/Howto/Use Jetty with Eclipse|How to Use Jetty with Eclipse IDE]] for details.
 +
 
 +
====Jetty Maven Plugin====
 +
 
 +
You can run jetty directly on your maven webapp project - without even needing to assemble it into a war - see [[Jetty/Feature/Jetty Maven Plugin | The Jetty Maven Plugin]] for details.
 +
 
 +
====Jetty Ant Plugin====
 +
 
 +
You can run jetty directly on your ant webapp project - see [[Jetty/Howto/Use Jetty with Ant|The Jetty Ant Plugin]] for details.
 +
 
 +
====Jetty Runner====
 +
 
 +
You can run jetty from a single jar file on one or more webapps and contexts using the [[Jetty/Howto/Using Jetty Runner|Jetty Runner Jar]].
  
 
====JUnit Startup====
 
====JUnit Startup====
  
 
}}
 
}}

Latest revision as of 13:44, 23 April 2013



Introduction

Warning2.png
Jetty 7 and Jetty 8 are now EOL (End of Life)




THIS IS NOT THE DOCUMENTATION YOU ARE LOOKING FOR!!!!!






All development and stable releases are being performed with Jetty 9 and Jetty 10.






This wiki is now officially out of date and all content has been moved to the Jetty Documentation Hub






Direct Link to updated documentation: http://www.eclipse.org/jetty/documentation/current/quickstart-running-jetty.html


This howto covers how to start up Jetty as standalone, and links to pages which cover alternative methods of startup.


Steps

Standalone Startup

Using the Start.jar

The easiest way to start Jetty, is to use the start.jar that comes with the distribution.

java -jar start.jar

The default options may be specified in the start.ini file, or if that is not present, they are defined in the start.config file that is within the start.jar.

To see the command line options for start.jar and help text for start.jar use:

java -jar start.jar --help

For a full description of start.jar features see Jetty Start.jar Feature Guide.

More start.jar examples

To run jetty with all options enabled:

 
java -jar start.jar OPTIONS=All

To run with JSP support (if available)

 
java -jar start.jar OPTIONS=Server,jsp

To run with JMX support

 
java -jar start.jar OPTIONS=Server,jmx etc/jetty-jmx.xml etc/jetty.xml

To run with JSP & JMX support

 
java -jar start.jar OPTIONS=Server,jsp,jmx etc/jetty-jmx.xml etc/jetty.xml


Alternative Startup Techniques

Embedded Startup

Jetty can be configured and started as an embedded webapp server from within another Java program. See Embedding Jetty Tutoral for more details. Once you have a main that runs Jetty, it is very easy to run this from your IDE, debugger and/or profiler.

Eclipse Startup

Jetty can be started up from within Eclipse using a variety of techniques; see How to Use Jetty with Eclipse IDE for details.

Jetty Maven Plugin

You can run jetty directly on your maven webapp project - without even needing to assemble it into a war - see The Jetty Maven Plugin for details.

Jetty Ant Plugin

You can run jetty directly on your ant webapp project - see The Jetty Ant Plugin for details.

Jetty Runner

You can run jetty from a single jar file on one or more webapps and contexts using the Jetty Runner Jar.

JUnit Startup

Back to the top