private String getPage(DebugPage page, HandlerContext context) throws IOException { page.initWith(context); // Get the template String template = page.getTemplate(context); // Inject Mustache context template = template.replace("%CONTEXT%", UrlUtils.getContext(context.getRequest()).toString()); Map<String, String> variables = page.getExtraParams(); if (variables != null) { for (Entry<String, String> variable : variables.entrySet()) { template = template.replace(variable.getKey(), variable.getValue()); } } template = template.replace("%MUSTACHE_CTX%", page.getContext()); return template; } }
private String getPage(DebugPage page, HandlerContext context) throws IOException { page.initWith(context); // Get the template String template = page.getTemplate(context); // Inject Mustache context template = template.replace("%CONTEXT%", UrlUtils.getContext(context.getRequest()).toString()); Map<String, String> variables = page.getExtraParams(); if (variables != null) { for (Entry<String, String> variable : variables.entrySet()) { template = template.replace(variable.getKey(), variable.getValue()); } } template = template.replace("%MUSTACHE_CTX%", page.getContext()); return template; } }
commonCtx.put("currentContextPath", UrlUtils.getContext(context.getRequest()).toString()); commonCtx.put("currentUri", appUri); StringBuilder debuggerUrl = new StringBuilder(UrlUtils.getContext(context.getRequest())); UrlUtils.addParameter(debuggerUrl, WebConstants.DANDELION_DEBUGGER); commonCtx.put("debuggerUrl", debuggerUrl);
commonCtx.put("currentContextPath", UrlUtils.getContext(context.getRequest()).toString()); commonCtx.put("currentUri", appUri); StringBuilder debuggerUrl = new StringBuilder(UrlUtils.getContext(context.getRequest())); UrlUtils.addParameter(debuggerUrl, WebConstants.DANDELION_DEBUGGER); commonCtx.put("debuggerUrl", debuggerUrl);