Template template = velocityView.getTemplate((String) value);
// merge the template and context into the writer
velocityView.merge(template, context, request.getWriter());
} else {
throw new InvalidTemplateException(
"Cannot render a template that is not a string: "
+ value.toString());
}
} else {
throw new InvalidTemplateException("Cannot render a null template");
}
}