---
title: Use the sample application
description: Download, start, stop, and configure the sample application mockup web app used for testing PingGateway configurations
component: pinggateway
version: 2024.11
page_id: pinggateway:getting-started:start-sampleapp
canonical_url: https://docs.pingidentity.com/pinggateway/2026/getting-started/start-sampleapp.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-09-24T13:44:40Z
keywords: ["Install", "Configuration"]
superseded_by: https://docs.pingidentity.com/pinggateway/2026/getting-started/start-sampleapp.html
section_ids:
  start-sampleapp-download: Download the sample application
  start-sampleapp-start: Start the sample application
  start-sampleapp-stop: Stop the sample application
  start-sampleapp-static: Serve static resources
  start-sampleapp-conf: Configuration options
---

# Use the sample application

ForgeRock provides a mockup web application for testing PingGateway configurations. The sample application is used in the examples in this guide and the *Gateway guide*.

## Download the sample application

1. Download `PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar`, from the [Ping Identity Product Downloads](https://product-downloads.pingidentity.com/).

## Start the sample application

1. Start the sample application:

   ```bash
   $ java -jar PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar

   ...
   [...] [INFO   ] Press Ctrl+C to stop the server.
   ```

   By default this server listens for HTTP on port 8081 and for HTTPS on port 8444. If one or both of those ports aren't free, specify other ports:

   ```bash
   $ java -jar PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar 8888 8889
   ```

   By default, OpenTelemetry support is disabled in the sample application. To enable it, set `OTEL_SDK_DISABLED=false` when starting the sample application:

   ```bash
   $ OTEL_SDK_DISABLED=false java -jar PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar
   ```

   The tracing configuration for the sample application uses automatic configuration. For example, to enable OpenTelemetry support and publish to a remote service:

   ```bash
   $ OTEL_SDK_DISABLED=false \
   OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://exporter.example.com:1234/traces \
   java -jar PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar
   ```

   Learn more about configuration options in the OpenTelemetry documentation on [automatic configuration](https://opentelemetry.io/docs/languages/java/instrumentation/#automatic-configuration). The sample application supports only `http/protobuf` for the exporter protocol.

2. Check that the sample application is running in one of the following ways:

   1. Go to <http://app.example.com:8081/home> to access the home page of the sample application. Information about the browser request is displayed.

   2. Go to <http://app.example.com:8081/login> to access the login page of the sample application, and then log in with username `demo` and password `Ch4ng31t`. The username and some information about the browser request is displayed.

## Stop the sample application

1. In the terminal where the sample application is running, select CTRL+C to stop the sample application.

## Serve static resources

When the sample application is used with PingGateway in examples, it must serve static resources, such as the .css. Similarly, browser requests often serve resources that don't need protection, such as icons and .gif files.

Add the following route to PingGateway to serve the sample application .css and other static resources:

* Linux

* Windows

```
$HOME/.openig/config/routes/00-static-resources.json
```

```
%appdata%\OpenIG\config\routes\00-static-resources.json
```

```json
{
  "name" : "00-static-resources",
  "baseURI" : "http://app.example.com:8081",
  "condition": "${find(request.uri.path,'^/css') or matchesWithRegex(request.uri.path, '^/.*\\\\.ico$') or matchesWithRegex(request.uri.path, '^/.*\\\\.gif$')}",
  "handler": "ReverseProxyHandler"
}
```

## Configuration options

To view the command-line options for the sample application, start it with the `-h` option:

```bash
$ java -jar PingGateway-sample-application-2024.11.3-jar-with-dependencies.jar -h
Usage: <main class> [options]
  Options:
    --http
      The HTTP port number.
      Default: 8081
    --https
      The HTTPS port number.
      Default: 8444
    --session
      The session timeout in seconds.
      Default: 60
    --am-discovery-url
      The AM URL base for OpenID Provider Configuration.
      Default: https://openam.example.com:8445/openam/oauth2
    --latency
      The simulated request latency in seconds.
      Default: 2
    -h, --help
      Default: false
```
