Jetty Logo
Version: 9.4.30.v20200611
Contact the core Jetty developers at

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 for sponsored feature development


Metro Setup

Metro is the reference implementation for web services. You can easily use Metro with Jetty to integrate web services with your web applications.

Metro Setup

  1. Download the Metro distribution and unpack it to your disk. We’ll refer to the unpacked location as $metro.home.
  2. Create the directory $jetty.home/lib/metro
  3. Copy the jars from $metro.home/lib to $jetty.home/lib/metro
  4. Edit the start.ini file and add an OPTION line for metro near the end.


That’s all the setup you need to do to integrate Jetty and Metro.

Now read the Metro documentation on how to create web services. The Metro distribution you downloaded should also contain several example web applications in the $metro.home/samples directory that you can build and deploy to Jetty (simply by copying the war file produced by the build).

Here’s an example of the log output from Jetty when one of the sample Metro wars (from $metro.home/samples/async) is deployed to Jetty:

[2093] java -jar start.jar

2013-07-26 15:47:53.480:INFO:oejs.Server:main: jetty-9.0.4.v20130625
2013-07-26 15:47:53.549:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/home/user/jetty-distribution-9.4.30.v20200611/webapps/] at interval 1
Jul 26, 2013 3:47:53 PM contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Jul 26, 2013 3:47:56 PM createRoot
INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/metro-async-AddNumbersService-AddNumbersImplPort
Jul 26, 2013 3:47:56 PM <init>
INFO: WSSERVLET14: JAX-WS servlet initializing
2013-07-26 15:47:56.800:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@75707c77{/metro-async,file:/tmp/jetty-,AVAILABLE}{/metro-async.war}
2013-07-26 15:47:56.853:INFO:oejs.ServerConnector:main: Started ServerConnector@47dce809{HTTP/1.1}{}

See an error or something missing? Contribute to this documentation at Github!(Generated: 2020-06-11)