if (indexHtml == null) {
WebApp app = (WebApp) WebApp.getApp(request);
Map<String, List<String>> context = new HashMap<String, List<String>>();
context.put(PLUGIN_JS_RESOURCES_PARAM, app.getPluginsJsResources());
context.put(PLUGIN_CSS_RESOURCES_PARAM, app.getPluginsCssResources());
TemplateLoader templateLoader = new ServletContextTemplateLoader(request.getServletContext(), "/", ".hbs");
Handlebars handlebars = new Handlebars(templateLoader);
Template template = handlebars.compile("index");
indexHtml = template.apply(context);
}
return indexHtml;