Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simple example of creating an executable war file with an embedded jetty

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 config
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

This is a very simple example of creating a self-contained JRuby executable which runs an embedded Jetty web server.

If you want to try it out you'll need to be running JRuby and have Bundler installed. Then install the dependencies:

bundle install

Create the executable WAR file with:

bundle exec rake war

And then to start the application running:

java -jar jruby-embedded-jetty.war

You can pass extra system properties at the command line too, For instance to change the port the application will run on and to enable jmx output you could use:

java -server -Dcom.sun.management.jmxremote -Djetty.port=8090 -jar jruby-embedded-jetty.war
Something went wrong with that request. Please try again.