// Fetch the root page; this warms-up the app
try {
HttpClient httpClient = JreHttpClient.create();
URI uri = URI.create("http://127.0.0.1:8080/");
HttpRequest httpRequest = httpClient.buildRequest(HttpMethod.GET, uri);
try (HttpResponse response = httpRequest.doRequest()) {
if (response.getHttpResponseCode() != 200) {
throw new IllegalStateException("Bad response code from page: " + response.getHttpResponseCode());
}
}
} catch (Exception e) {