context.put("title", page.getTitle());
StringWriter buffer = new StringWriter();
page.writeBody(OutputConverter.getWriter(buffer));
context.put("body", buffer.toString());
buffer = new StringWriter();
page.writeHead(OutputConverter.getWriter(buffer));
context.put("head", buffer.toString());
context.put("params", params);
writer.write(VelocityUtils.getRenderedTemplate(decorator.getPage(), context));
} else {
throw new IOException("could not find decorator with name: " + decoratorName);