Source:
<code>public Response getMainPage() throws URISyntaxException, IOException, FreeMarkerException { if (!uriInfo.getRequestUri().getPath().endsWith("/")) { return Response.status(302).location(uriInfo.getRequestUriBuilder().path("/").build()).build(); } else { Map<String, Object> map = new HashMap<>(); URI baseUri = uriInfo.getBaseUri(); map.put("authUrl", session.getContext().getContextPath()); map.put("baseUrl", session.getContext().getContextPath() + "/realms/" + realm.getName() + "/account"); map.put("realm", realm.getName()); map.put("resourceUrl", Urls.themeRoot(baseUri).getPath() + "/account/" + theme.getName()); map.put("resourceVersion", Version.RESOURCES_VERSION); String[] referrer = getReferrer(); if (referrer != null) { map.put("referrer", referrer[0]); map.put("referrer_uri", referrer[1]); } try { if (auth != null) { Locale locale = session.getContext().resolveLocale(auth.getUser()); map.put("locale", locale.toLanguageTag()); Properties messages = theme.getMessages(locale); <START> map.put("javaMessages", new MessageFormatterMethod(locale, messages)); <END> map.put("msg", messagesToJsonString(messages)); } } catch (Exception e) { logger.warn("Failed to load messages", e); } map.put("properties", theme.getProperties()); FreeMarkerUtil freeMarkerUtil = new FreeMarkerUtil(); String result = freeMarkerUtil.processTemplate(map, "index.ftl", theme); Response.ResponseBuilder builder = Response.status(Response.Status.OK).type(MediaType.TEXT_HTML_UTF_8).language(Locale.ENGLISH).entity(result); BrowserSecurityHeaderSetup.headers(builder, realm); return builder.build(); } }</code><technical_language>is javaMessages used? I anywhere. In case I a name including Java. "advancedMsg"</technical_language>

Target:
public Response getMainPage() throws URISyntaxException, IOException, FreeMarkerException { if (!uriInfo.getRequestUri().getPath().endsWith("/")) { return Response.status(302).location(uriInfo.getRequestUriBuilder().path("/").build()).build(); } else { Map<String, Object> map = new HashMap<>(); URI baseUri = uriInfo.getBaseUri(); map.put("authUrl", session.getContext().getContextPath()); map.put("baseUrl", session.getContext().getContextPath() + "/realms/" + realm.getName() + "/account"); map.put("realm", realm.getName()); map.put("resourceUrl", Urls.themeRoot(baseUri).getPath() + "/account/" + theme.getName()); map.put("resourceVersion", Version.RESOURCES_VERSION); String[] referrer = getReferrer(); if (referrer != null) { map.put("referrer", referrer[0]); map.put("referrer_uri", referrer[1]); } try { if (auth != null) { Locale locale = session.getContext().resolveLocale(auth.getUser()); map.put("locale", locale.toLanguageTag()); Properties messages = theme.getMessages(locale); map.put("msg", messagesToJsonString(messages)); } } catch (Exception e) { logger.warn("Failed to load messages", e); } map.put("properties", theme.getProperties()); FreeMarkerUtil freeMarkerUtil = new FreeMarkerUtil(); String result = freeMarkerUtil.processTemplate(map, "index.ftl", theme); Response.ResponseBuilder builder = Response.status(Response.Status.OK).type(MediaType.TEXT_HTML_UTF_8).language(Locale.ENGLISH).entity(result); BrowserSecurityHeaderSetup.headers(builder, realm); return builder.build(); } }