}
private void renderResource(HttpExchange httpExchange, String resource, Map<String, Object> ctx) throws Exception {
byte[] data;
if (ctx != null) {
TemplateRenderer renderer = rendererFactory.create(resource, new FileVisitor() {
@Override
public String read(File root, String file, String charset) throws IOException {
InputStreamReader reader = new InputStreamReader(getClass().getResourceAsStream(file), "utf-8");
try {
StringBuilder sb = new StringBuilder();