Some other sugestions in the VelocityEndoint are:

String tmplName = VM_PATH+"/"+vtlName+".vm";
Template t = Velocity.getTemplate(tmplName);
StringWriter writer = new StringWriter();
Map variableMap = ExchangeHelper.createVariableMap(exchange); 
Context velocityContext = new VelocityContext(variableMap); 
t.merge(velocityContext, writer);
String result = writer.toString();

instead of:
Reader reader = new InputStreamReader(getResource().getInputStream());
StringWriter buffer = new StringWriter();
String logTag = getClass().getName();
Map variableMap = ExchangeHelper.createVariableMap(exchange);
Context velocityContext = new VelocityContext(variableMap);
VelocityEngine engine = getVelocityEngine();
engine.evaluate(velocityContext, buffer, logTag, reader);
-- 
View this message in context: 
http://www.nabble.com/Velocity-templating-tp17079359s22882p17082360.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to