Tomcat Server Setup and Configuration

Prerequisites (Maven)

Reveal Java SDK is distributed as a set of Maven modules. To work with the SDK libraries, you need to add a reference to Reveal's Maven Repository and also a dependency in your Maven pom.xml file.

Add the following repository:


And the following dependency:


Replace version_number with a number similar to 0.9.6.

If you are not familiar with Maven, please refer to the following link.

Setup and Configuration

To set up the Reveal with an existing Tomcat application or any other JEE container, you need to:

  1. Add a dependency to JAX-RS implementation.
  2. Add a dependency to Reveal SDK.
  3. Initialize Reveal.
  4. Enable server-side export.

Step 1 - Adding a dependency to JAX-RS implementation

Add a dependency to a Jakarta RESTful Web Services (JAX-RS) implementation. You can choose between multiple options like Jersey, RESTeasy, Apache CXF, etc. Please follow the steps described by the provider of your preference.

As an example, here the dependencies you need to add for Jersey:


Step 2 - Adding a dependency to Reveal SDK

Add a dependency to reveal-sdk and specify your SDK version.


Replace version_number with a number similar to 1.0.1821.

Step 3 - Initializing Reveal

Add a ServletContextListener class to initialize Reveal. To do this, you can copy the class WebAppListener from upmedia-backend-tomcat source code, located inside the package

To initialize Reveal, you use RevealEngineInitializer.initialize.

It is possible to invoke the method without initial parameters:


But most of the times, you will be using parameters as shown in the example below:

    new InitializeParameterBuilder()
        .setAuthProvider(new RevealAuthenticationProvider())
        .setUserContextProvider(new RevealUserContextProvider())
        .setDashboardProvider(new RevealDashboardProvider())
        .setDataSourceProvider(new UpMediaDataSourceProvider())
        .setDataProvider(new UpMediaInMemoryDataProvider())

Those parameters, are the providers used to customize Reveal, you’ll need to create your own providers when integrating Reveal into your application.

The available parameters passed to RevealEngineInitializer.initialize are:

  • setAuthProvider. Here you should include a custom class that resolves authentication, implementing IRVAuthenticationProvider.
  • setUserContextProvider. Custom class that provides information about the user, implementing IRVUserContextProvider.
  • setDashboardProvider. Custom class that replaces or modifies a dashboard, implementing IRVDashboardProvider.
  • setDataSourceProvider. Custom class that replaces or modifies a data source, implementing IRVDataSourceProvider.
  • setDataProvider. Custom class that returns in-memory data for dashboards, implementing IRVDataProvider.
  • setLicense. Here you can configure the SDK license, by including the Serial Key.

For further details about how implement your own Dashboards provider, please check our UpMedia samples in GitHub.

Step 4 - Enabling server-side export

The Java SDK uses some native components for exporting dashboards to different formats: Image, PDF, PPT and Excel.

If you are interested in exporting server-side to one or more of those formats, please refer to Server-side Export Configuration