This project contains a barebones example webapp that uses embedded Jetty and Maven to deploy a server.

This project is laid out like this:

  • hello-world-embedded-jetty-maven/
    • pom.xml is a Maven POM file that defines the project.
    • src/main/ is a directory that contains the code.
      • java/ is a directory that contains server-side code.
        • is the main class that sets up the server.
        • is a Java servlet that returns some HTML content.
      • webapp/ is a directory that contains web files.
        • index.html is an HTML file that shows static content.

You can run this locally by executing this command:

mvn package exec:java

Learn more at