Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Wizard in a box Wizard in a box

Build Status Mvn Version

End of life:

"In one year time our team built up enough trust at the management level to run the Dropwizard based services in Docker containers orchestrated by Helios. Wizard in a box served us really well in the meantime and minimized significantly our migration effort to the new platform. But from now one we do not need it anymore ourselves.
Hence I will not upgrade Wizard in a box to Dropwizard 1.0. But feel free to fork the project and keep it alive."

"A big thank you to all the committers of Wizard in a box"


It makes a lot of sense to deliver Dropwizard applications as self-contained, executable jars. But sometimes your delivery options will be severely limited by company standards. Often the JEE server on the production environment is fixed and can not be questioned. Even in this case using the Dropwizard library is still worthwhile. The biggest advantage is that it makes it easy to create a production ready service. Without Dropwizard it would be a time consuming process to harden the service.

'Wizard in a box' makes it trivial to deploy a Dropwizard application as a war on a JEE container. Also it allows you to use an embedded Jetty container during development and deploy to the targeted application server on your continous integration server. Hence the speed of development will be less impacted by infrastructural decisions.


Add an extra Maven module to your modules pom and create a pom for your new war module:

<?xml version="1.0" encoding="UTF-8"?>
<project ...>


        <!-- Your module containing the Dropwizard application -->
        <!-- Logging implementation that you want to use underneath Slf4j --> 
        <!-- Needed or not needed depending on the version delivered by your targeted application server -->


Wrap your Dropwizard application in a WebApplication:

package ...

import ...

public class YourWebApplication  extends WebApplication<YourDropwizardConfiguration> {
    public YourWebApplication() {
        super(new YourDropwizardApplication(), "your-dropwizard-war-config.yml");

Add the configuration file to the src/main/resources folder of the war module:


  type: bridge


Default context paths are /application for main application and /admin for admin application. Those path can be customized in the configuration

  type: bridge
  applicationContextPath: /api/v1
  adminContextPath: /admin

Assets (see can be served from the root context of the web application.

  type: bridge
  applicationContextPath: /api/v1
  adminContextPath: /admin
    - assets  

The property servletsMappedFromRootContext is the list of application servlets which should be directly coupled to the webapp root context. Hence they will not be prefixed with the application context path.

If needed add application server specific files to the src/main/webapp folder (Tomcat -> META-INF/context.xml, Weblogic -> WEB-INF/weblogic.xml, ...)


See src/it/wizard-in-a-box-integration-tests/sanity-check-sample-wiz-app-war (The integration test can serve as a sample as well)

Under the hood:

Technical design

When you wrap your regular Dropwizard application with a WebApplication, the WebApplication will swap Dropwizards default ConfigurationSourceProvider with an implementation reading the configuration file from the classpath. The WebApplication implements a JEE WebListener, hence the JEE container will boot the Dropwizard application when the war is started on the container. DropWizard will then parse the configuration. By defining the servertype as a bridge in the configuration file. Dropwizard will instantiate a JEEBridgeFactory instead of a DefaultServerFactory or a SimpleServerFactory. The JEEBridgeFactory will dynamically register servlets, filters, attributes at the JEE servlet context. Also it will create a fake Jetty server instead of a real one. The fake server has the start and stop of the underlying Jetty server disabled.


Adapter for a dropwizard appication (v0.8) so that it can be deployed as a war on a servlet 3 container






No packages published

Contributors 4